[clang] [clang][hexagon] Add support for -nolibc (PR #67515)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 22:01:55 PDT 2023


================
@@ -401,6 +401,30 @@
 // CHECK338-NOT: "--end-group"
 // CHECK338: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/fini.o"
 
+// RUN: %clangxx -### -target hexagon-unknown-elf \
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
+// RUN:   -mcpu=hexagonv60 \
+// RUN:   -nolibc \
+// RUN:   %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-NOLIBC %s
+// CHECK-NOLIBC: "-cc1"
+// CHECK-NOLIBC: {{hexagon-link|ld}}
+// CHECK-NOLIBC: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o"
+// CHECK-NOLIBC: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0.o"
+// CHECK-NOLIBC: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/init.o"
+// CHECK-NOLIBC: "-L{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60"
+// CHECK-NOLIBC: "-L{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib"
+// CHECK-NOLIBC: "{{[^"]+}}.o"
+// CHECK-NOLIBC: "-lstdc++"
+// CHECK-NOLIBC: "-lm"
----------------
androm3da wrote:

I may have done `-SAME` to excess. This test passes locally but fails on some of the bots because `hexagon-link` isn't on the same line as the subsequent `... crt0_standalone.o`.  Wouldn't have thought that behavior would be system-dependent but perhaps we can be less strict about this test.

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


More information about the cfe-commits mailing list