Skip to content

Commit 7dc1ceb

Browse files
TwoFXkim-em
authored andcommitted
fix: do not link statically against pthread/dl/rt (#5966)
1 parent df54bec commit 7dc1ceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script/prepare-llvm-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fi
6464
# use `-nostdinc` to make sure headers are not visible by default (in particular, not to `#include_next` in the clang headers),
6565
# but do not change sysroot so users can still link against system libs
6666
echo -n " -DLEANC_INTERNAL_FLAGS='-nostdinc -isystem ROOT/include/clang' -DLEANC_CC=ROOT/bin/clang"
67-
echo -n " -DLEANC_INTERNAL_LINKER_FLAGS='-L ROOT/lib -L ROOT/lib/glibc ROOT/lib/glibc/libc_nonshared.a ROOT/lib/glibc/libpthread_nonshared.a -Wl,--as-needed -Wl,-Bstatic -lgmp -lunwind -luv -lpthread -ldl -lrt -Wl,-Bdynamic -Wl,--no-as-needed -fuse-ld=lld'"
67+
echo -n " -DLEANC_INTERNAL_LINKER_FLAGS='-L ROOT/lib -L ROOT/lib/glibc ROOT/lib/glibc/libc_nonshared.a ROOT/lib/glibc/libpthread_nonshared.a -Wl,--as-needed -Wl,-Bstatic -lgmp -lunwind -luv -Wl,-Bdynamic -Wl,--no-as-needed -fuse-ld=lld'"
6868
# when not using the above flags, link GMP dynamically/as usual
6969
echo -n " -DLEAN_EXTRA_LINKER_FLAGS='-Wl,--as-needed -lgmp -luv -lpthread -ldl -lrt -Wl,--no-as-needed'"
7070
# do not set `LEAN_CC` for tests

0 commit comments

Comments
 (0)