[clang] [Clang][test] Limit library search when linking shared lib (PR #80253)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 23:25:05 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Wei Wang (apolloww)
<details>
<summary>Changes</summary>
Don't search for unnecessary libs when linking the shared lib. This allows the test to run in chroot environment.
---
Full diff: https://github.com/llvm/llvm-project/pull/80253.diff
1 Files Affected:
- (modified) clang/test/Interpreter/cxx20-modules.cppm (+1-1)
``````````diff
diff --git a/clang/test/Interpreter/cxx20-modules.cppm b/clang/test/Interpreter/cxx20-modules.cppm
index 239968d8c7445..4e56e2fc1528a 100644
--- a/clang/test/Interpreter/cxx20-modules.cppm
+++ b/clang/test/Interpreter/cxx20-modules.cppm
@@ -8,7 +8,7 @@
// RUN: %clang -std=c++20 %t/mod.cppm --precompile \
// RUN: -o %t/mod.pcm --target=x86_64-linux-gnu
// RUN: %clang -fPIC %t/mod.pcm -c -o %t/mod.o --target=x86_64-linux-gnu
-// RUN: %clang -fPIC -shared %t/mod.o -o %t/libmod.so --target=x86_64-linux-gnu
+// RUN: %clang -nostdlib -fPIC -shared %t/mod.o -o %t/libmod.so --target=x86_64-linux-gnu
//
// RUN: cat %t/import.cpp | env LD_LIBRARY_PATH=%t:$LD_LIBRARY_PATH \
// RUN: clang-repl -Xcc=-std=c++20 -Xcc=-fmodule-file=M=%t/mod.pcm \
``````````
</details>
https://github.com/llvm/llvm-project/pull/80253
More information about the cfe-commits
mailing list