Dont link -lrt in the testsuite on linux unless using sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier 2015-10-01 06:15:26 +00:00
parent 6a85e8a355
commit 49abdbcca3

View File

@ -529,7 +529,6 @@ class Configuration(object):
self.cxx.link_flags += ['-lc', '-lm']
if enable_threads:
self.cxx.link_flags += ['-lpthread']
self.cxx.link_flags += ['-lrt']
if llvm_unwinder:
self.cxx.link_flags += ['-lunwind', '-ldl']
else:
@ -604,7 +603,10 @@ class Configuration(object):
# Setup the sanitizer compile flags
self.cxx.flags += ['-g', '-fno-omit-frame-pointer']
if self.target_info.platform() == 'linux':
self.cxx.link_flags += ['-ldl']
# The libraries and their order are taken from the
# linkSanitizerRuntimeDeps function in
# clang/lib/Driver/Tools.cpp
self.cxx.link_flags += ['-lpthread', '-lrt', '-lm', '-ldl']
if san == 'Address':
self.cxx.flags += ['-fsanitize=address']
if llvm_symbolizer is not None: