[libcxx] r248986 - Dont link -lrt in the testsuite on linux unless using sanitizers.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 23:15:26 PDT 2015
Author: ericwf
Date: Thu Oct 1 01:15:26 2015
New Revision: 248986
URL: http://llvm.org/viewvc/llvm-project?rev=248986&view=rev
Log:
Dont link -lrt in the testsuite on linux unless using sanitizers.
Modified:
libcxx/trunk/test/libcxx/test/config.py
Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=248986&r1=248985&r2=248986&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Thu Oct 1 01:15:26 2015
@@ -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:
More information about the cfe-commits
mailing list