summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-23 00:46:10 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-23 00:46:10 +0000
commitecfd5c84ca86f0419d15a2358bb06d6f758ff73b (patch)
treec2fef4d5d40985947ecd7c64940d9b764dcb85c1 /clang/lib/Lex/ModuleMap.cpp
parentf299947bfaef176300de04c50e6dbbda863c2c96 (diff)
downloadbcm5719-llvm-ecfd5c84ca86f0419d15a2358bb06d6f758ff73b.tar.gz
bcm5719-llvm-ecfd5c84ca86f0419d15a2358bb06d6f758ff73b.zip
Revert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.
This is a sad thing to do, but all the alternatives look ugly. Looks like there are legitimate cases when users may want to link with sanitizer runtimes *and* -nodefaultlibs (and ensure they provide replacements for system libraries). For example, this happens in libc++ test suite. "-nodefaultlibs" is told to link only the libraries explicitly provided by the user, and providing "-fsanitize=address" is a clear indication of intention to link with ASan runtime. We can't easily introduce analogue of "-print-libgcc-name": linking with sanitizers runtimes is not trivial: some runtimes are split into several archive libraries, which are required to be wrapped in -whole-archive/-no-whole-archive. If "-fsanitize=whatever" and "-nodefaultlibs" are provided, system library dependencies of sanitizer runtimes (-lc/-ldl/-lpthread/-lrt) will *not* be linked, and user would have to link them in manually. Note that this can cause problems, as failing to provide "-lrt" might lead to crashes in runtime during ASan initialization. But looks like we should bite this bullet. See r218541 review thread for the discussion. llvm-svn: 220455
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud