================
@@ -688,19 +688,45 @@
 // 
-----------------------------------------------------------------------------
 // Passing -fno-use-init-array
 // 
-----------------------------------------------------------------------------
-// RUN: %clang --sysroot= -### --target=hexagon-unknown-elf \
+// RUN: %clang -### --target=hexagon-unknown-elf \
 // RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
 // RUN:   -mcpu=hexagonv60 %s 2>&1 | FileCheck -check-prefix=CHECK384 %s
 // CHECK384:          "-fno-use-init-array"
 // 
-----------------------------------------------------------------------------
 // ThinLTO passes LTO options to the linker
 // 
-----------------------------------------------------------------------------
 // RUN: touch %t.o
-// RUN: %clang --sysroot= -### --target=hexagon-unknown-elf \
+// RUN: %clang -### --target=hexagon-unknown-elf \
 // RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
 // RUN:   -mcpu=hexagonv60 \
 // RUN:   -fuse-ld=lld \
 // RUN:   -flto=thin -fenable-matrix \
 // RUN:   %t.o 2>&1 | FileCheck -check-prefix=CHECK-LTO %s
 // CHECK-LTO: "-plugin-opt=thinlto"
 // CHECK-LTO: "-plugin-opt=-enable-matrix"
+
+// 
-----------------------------------------------------------------------------
+// Versioned ld.lld is recognized as LLD
+// 
-----------------------------------------------------------------------------
+// RUN: %clang -### --target=hexagon-unknown-elf \
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
+// RUN:   -mcpu=hexagonv60 \
+// RUN:   --ld-path=%S/Inputs/hexagon_tree/Tools/bin/ld.lld-23 \
+// RUN:   -nostdlib %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-VERSIONED-LLD %s
+// CHECK-VERSIONED-LLD: "{{.*}}ld.lld-23"
+// CHECK-VERSIONED-LLD-NOT: "-march=hexagon"
+// CHECK-VERSIONED-LLD-NOT: "-mcpu=hexagonv60"
+
+// 
-----------------------------------------------------------------------------
+// Triple-prefixed ld.lld is recognized as LLD
+// 
-----------------------------------------------------------------------------
+// RUN: %clang -### --target=hexagon-unknown-elf \
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
+// RUN:   -mcpu=hexagonv60 -fuse-ld=gold \
+// RUN:   
--ld-path=%S/Inputs/hexagon_tree/Tools/bin/hexagon-unknown-elf-ld.lld \
----------------
quic-k wrote:

yeah, --ld-path takes precedence over -fuse-ld, just wanted to make sure lld is 
identified

https://github.com/llvm/llvm-project/pull/228982
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to