================
@@ -74,3 +74,8 @@
// RUN: %clang_cl --target=x86_64-unknown-windows-msvc /Tc%s -flto
-fuse-ld=lld -### -fprofile-sample-use=%S/Inputs/file.prof 2>&1 | FileCheck
-check-prefix=CHECK-SAMPLE-PROFILE %s
// CHECK-SAMPLE-PROFILE: "-lto-sample-profile:{{.*}}/file.prof"
+
+// RUN: %clang_cl -fuse-ld=lld -Xlinker --version -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=XLINKER --implicit-check-not="warning:"
+
+// XLINKER: TODO
----------------
zmodem wrote:
You don't need one :-) This command, and the whole test, runs on all platforms.
For me it prints:
```
$ build/bin/clang-cl -fuse-ld=lld -Xlinker --version -###
clang version 23.0.0git (https://github.com/llvm/llvm-project.git
fdd2437af3cdc6d5fe199fcc9d991ccf503b55bd)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: /work/llvm-project/build/bin
Build config: +assertions
"/work/llvm-project/build/bin/lld-link" "-out:.exe" "-libpath:lib/amd64"
"-libpath:atlmfc/lib/amd64" "-nologo" "--version"
```
Something like:
```
// XLINKER: lld-link
// XLINKER: --version
```
should work.
It's a bit weird not to pass any input files though. I'd probably add `/Tc%s`
to the clang-cl line like the other linker tests.
https://github.com/llvm/llvm-project/pull/187395
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits