]> granicus.if.org Git - clang/commit
Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.
authorAlexey Samsonov <vonosmas@gmail.com>
Fri, 26 Sep 2014 21:22:08 +0000 (21:22 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Fri, 26 Sep 2014 21:22:08 +0000 (21:22 +0000)
commita0650715e75be11ed813da03ad5b0eccfebed6c3
treec88566139d5b421de5a93de12e713cfa7963a34d
parentfdd013e6e3a82cb04d2682ca608c10f1a0241b84
Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.

It makes no sense to link in sanitizer runtimes in this case: the user
probably doesn't want to see any system/toolchain libs in his link if he
provides these flags, and the link will most likely fail anyway - as sanitizer
runtimes depend on libpthread, libdl, libc etc.

Also, see discussion in https://code.google.com/p/address-sanitizer/issues/detail?id=344

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218541 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/sanitizer-ld.c