Commit 77b2ad3
committed
[lldb][test] Skip libc++ tests if it is linked statically.
Some tests from 'import-std-module' used to fail on the builder
https://lab.llvm.org/staging/#/builders/195/builds/4470, since libcxx is
set up to be linked statically with the binary on it.
Thus, they were temporarily disabled in #112530. Here, this commit is
reverted.
When libcxx is linked with a program as an archive of static libraries,
functions that aren't used in the program are omitted. Then, jitted
expressions from the tests try calling several functions
that aren't present in the process image, which causes the failure.
LLD (and GNU ld AFAIK) links a binary with libcxx shared library
if libc++.so is present in corresponding library search paths.
Otherwise, it tries static linking. Here, a linker flag is added
to a clang call in libcxx configuration, that ensures that
libc++.so is present and found by linker.
Forcing linker to keep all functions from libcxx archive in this way #98701,
without checking whether libcxx is linked statically looks like a less
clean solution, but I'm not sure about that.1 parent 9186c68 commit 77b2ad3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
| 779 | + | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| |||
0 commit comments