HomePhabricator

Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.

Authored by samsonov on Sep 26 2014, 2:22 PM.

Description

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

llvm-svn: 218541

Details