aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-08-29 12:19:34 -0700
committerFangrui Song <maskray@google.com>2020-09-01 21:13:45 -0700
commitdc6734020844e92feef0ab3e3714f01d2bb98ea4 (patch)
treebb6a316d995be674781be041a2ed1e9872d74e9b /clang/lib/Frontend/CompilerInvocation.cpp
parentbd09e0dd741334682792cb7459aea261b4e3952b (diff)
downloadllvm-dc6734020844e92feef0ab3e3714f01d2bb98ea4.zip
llvm-dc6734020844e92feef0ab3e3714f01d2bb98ea4.tar.gz
llvm-dc6734020844e92feef0ab3e3714f01d2bb98ea4.tar.bz2
[CMake] Remove -Wl,-allow-shlib-undefined which was added in rL221530
In GNU ld, gold and LLD, --no-allow-shlib-undefined is the default when linking an executable. The option disallows unresolved symbols in shared objects. (gold and LLD catch fewer cases than GNU ld. See D57385 for details) See D57569 why it is bad idea to use --allow-shlib-undefined for executables [a]. GNU ld traditionally copied DT_NEEDED entries transitively. This was deemed not good, so GNU ld 2.22 defaulted to --no-copy-dt-needed-entries. gold and LLD always behave like --no-copy-dt-needed-entries. rL221530 added -Wl,-allow-shlib-undefined to make some old releases of GNU ld's --no-copy-dt-needed-entries to actually work. Due to [a] and [b], this patch drops -Wl,-allow-shlib-undefined. [b]: In a -DBUILD_SHARED_LIBS=on build, `--as-needed --allow-shlib-undefined` can unexpectedly suppress some .dynsym entries. The issue can cause mlir-cpu-runner to fail at runtime. Note, on Debian, gcc newer than (gcc-9-20190125-2) enable --as-needed by default. See https://sourceware.org/bugzilla/show_bug.cgi?id=26551 for a reduced example. Reviewed By: mehdi_amini, echristo Differential Revision: https://reviews.llvm.org/D86839
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions