================
@@ -169,6 +169,24 @@ __attribute__((visibility("protected"), used)) int x;
// COFF: "/usr/bin/lld-link" {{.*}}.o -libpath:./ -out:a.exe
{{.*}}openmp.image.wrapper{{.*}}
+// RUN: rm -rf %t.dir && mkdir -p %t.dir
+// RUN: llvm-ar rcs %t.dir/foo.lib %t.o
+// RUN: llvm-ar rcs %t.dir/libbar.dll.a %t.o
+// RUN: clang-linker-wrapper --host-triple=x86_64-unknown-windows-msvc
--dry-run \
+// RUN: --linker-path=/usr/bin/lld-link %t.o -libpath:%t.dir foo.lib
-out:a.exe 2>&1 \
+// RUN: | FileCheck %s --check-prefix=COFF-LIBRARY
+// RUN: clang-linker-wrapper --host-triple=x86_64-w64-windows-gnu --dry-run \
+// RUN: --linker-path=/usr/bin/ld.lld %t.o -L%t.dir -lbar -o a.exe 2>&1 \
+// RUN: | FileCheck %s --check-prefix=COFF-LIBRARY
+
+// COFF-LIBRARY: clang{{.*}} --target=nvptx64-nvidia-cuda -march=sm_70
{{.*}}.o {{.*}}.o
+
+// RUN: clang-linker-wrapper --host-triple=x86_64-unknown-windows-msvc
--dry-run \
+// RUN: --linker-path=/usr/bin/lld-link -wholearchive:%t.dir/foo.lib
-out:a.exe 2>&1 \
----------------
yxsamliu wrote:
Can we also add a test for `/wholearchive:foo.lib` found through `-libpath:`?
The current test uses the full path in `/wholearchive:%t.dir/foo.lib`, so it
checks parsing the option, but not whether `foo.lib` is searched in `-libpath:`
directories.
https://github.com/llvm/llvm-project/pull/216239
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits