diff options
author | Eric Fiselier <eric@efcs.ca> | 2015-10-01 06:15:26 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2015-10-01 06:15:26 +0000 |
commit | f74bb3b8b028904d3c05ba62c13c0c0d7ac329c6 (patch) | |
tree | a0ce2b58bde8b9003d47d00a5104e1e624b35558 /libcxx/test | |
parent | 8b2f23d51541748501edf645c32ff27c1f6d9fb2 (diff) | |
download | bcm5719-llvm-f74bb3b8b028904d3c05ba62c13c0c0d7ac329c6.tar.gz bcm5719-llvm-f74bb3b8b028904d3c05ba62c13c0c0d7ac329c6.zip |
Dont link -lrt in the testsuite on linux unless using sanitizers.
llvm-svn: 248986
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/libcxx/test/config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index f66b831fc53..f8f336d59ff 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -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: |