aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/CodeCoverage.cpp
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2023-12-13 13:57:48 -0500
committerGitHub <noreply@github.com>2023-12-13 13:57:48 -0500
commita4336f2ec1747ea234a07d683930683f67fbd655 (patch)
treeb69bdbd5ab60d59ff8dcf6e11771a1718cbfda1d /llvm/tools/llvm-cov/CodeCoverage.cpp
parent2fd7657b6609454af7adb75765d164ec7d1bb80b (diff)
downloadllvm-a4336f2ec1747ea234a07d683930683f67fbd655.zip
llvm-a4336f2ec1747ea234a07d683930683f67fbd655.tar.gz
llvm-a4336f2ec1747ea234a07d683930683f67fbd655.tar.bz2
[runtimes] Don't link against compiler-rt explicitly when we use -nostdlib++ (#75089)
When we use the -nostdlib++ flag, we don't need to explicitly link against compiler-rt, since the compiler already links against it by default. This simplifies the flags that we need to use when building with Clang and GCC, and opens the door to further simplifications since most platforms won't need to detect whether libgcc and libgcc_s are supported anymore. Furthermore, on platforms where -nostdlib++ is used, this patch prevents manually linking compiler-rt *before* other system libraries. For example, Apple platforms have several compiler-rt symbols defined in libSystem.dylib. If we manually link against compiler-rt, we end up overriding the default link order preferred by the compiler and potentially using the symbols from the clang-provided libclang_rt.a library instead of the system provided one. Note that we don't touch how libunwind links against compiler-rt when it builds the .so/.a because libunwind currently doesn't use -nodefaultlibs and we want to avoid rocking the boat too much. rdar://119506163
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
0 files changed, 0 insertions, 0 deletions