[Lldb-commits] [lldb] [lldb][test] Make archflags for gcc and clang -march (PR #89760)

via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 23 06:13:53 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: None (ita-sc)

<details>
<summary>Changes</summary>

Hi

It seems that by default
```
# On non-Apple platforms, -arch becomes -m
```

This patch overrides this behavior, and if it is used clang or gcc/g++, flag becomes `-march`



---
Full diff: https://github.com/llvm/llvm-project/pull/89760.diff


1 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/make/Makefile.rules (+14) 


``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index bfd249ccd43f2e..5206466aa12750 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -212,6 +212,20 @@ else
 	endif
 endif
 
+ifneq (,$(findstring gcc,$(CC)))
+	ARCHFLAG :=-march=
+endif
+ifneq (,$(findstring g++,$(CC)))
+	ARCHFLAG :=-march=
+endif
+ifneq (,$(findstring clang,$(CC)))
+	ARCHFLAG :=-march=
+endif
+ifneq (,$(findstring clang++,$(CC)))
+	ARCHFLAG :=-march=
+endif
+
+
 LIMIT_DEBUG_INFO_FLAGS =
 NO_LIMIT_DEBUG_INFO_FLAGS =
 MODULE_DEBUG_INFO_FLAGS =

``````````

</details>


https://github.com/llvm/llvm-project/pull/89760


More information about the lldb-commits mailing list