forked from OSchip/llvm-project
6551ac7489
In the GNU toolchain, `-static-libgcc` implies that the unwindlib will be linked statically. However, when `--unwindlib=libunwind`, this flag is ignored, and a bare `-lunwind` is added to the linker args. Unfortunately, this means that if both `libunwind.so`, and `libunwind.a` are present in the library path, `libunwind.so` will be chosen in all cases where `-static` is not set. This change makes `-static-libgcc` affect the `-l` flag produced by `--unwindlib=libunwind`. After this patch, providing `-static-libgcc --unwindlib=libunwind` will cause the driver to explicitly emit `-l:libunwind.a` to statically link libunwind. For all other cases it will emit `-l:libunwind.so` matching current behavior with a more explicit link line. https://reviews.llvm.org/D70416 |
||
---|---|---|
.. | ||
ToolChains | ||
Action.cpp | ||
CMakeLists.txt | ||
Compilation.cpp | ||
DarwinSDKInfo.cpp | ||
Distro.cpp | ||
Driver.cpp | ||
DriverOptions.cpp | ||
InputInfo.h | ||
Job.cpp | ||
Multilib.cpp | ||
Phases.cpp | ||
SanitizerArgs.cpp | ||
Tool.cpp | ||
ToolChain.cpp | ||
Types.cpp | ||
XRayArgs.cpp |