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

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 14:52:46 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"
----------------
MaskRay wrote:

Use -SAME whether applicable.

I'll tidy this test a bit first...

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


More information about the cfe-commits mailing list