[libcxx] r226024 - Support picking the unwinder used for testing on linux (just as libc++abi testing allows)
Jonathan Roelofs
jonathan at codesourcery.com
Wed Jan 14 11:29:04 PST 2015
Author: jroelofs
Date: Wed Jan 14 13:29:04 2015
New Revision: 226024
URL: http://llvm.org/viewvc/llvm-project?rev=226024&view=rev
Log:
Support picking the unwinder used for testing on linux (just as libc++abi testing allows)
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=226024&r1=226023&r2=226024&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Wed Jan 14 13:29:04 2015
@@ -370,11 +370,21 @@ class Configuration(object):
'C++ ABI setting %s unsupported for tests' % cxx_abi)
def configure_extra_library_flags(self):
+ enable_threads = self.get_lit_bool('enable_threads', True)
+ llvm_unwinder = self.get_lit_conf('llvm_unwinder', False)
if sys.platform == 'darwin':
self.link_flags += ['-lSystem']
elif sys.platform.startswith('linux'):
- self.link_flags += ['-lgcc_eh', '-lc', '-lm', '-lpthread',
- '-lrt', '-lgcc_s']
+ if not llvm_unwinder:
+ self.link_flags += ['-lgcc_eh']
+ self.link_flags += ['-lc', '-lm']
+ if enable_threads:
+ self.link_flags += ['-lpthread']
+ self.link_flags += ['-lrt']
+ if llvm_unwinder:
+ self.link_flags += ['-lunwind', '-ldl']
+ else:
+ self.link_flags += ['-lgcc_s']
elif sys.platform.startswith('freebsd'):
self.link_flags += ['-lc', '-lm', '-pthread', '-lgcc_s']
else:
More information about the cfe-commits
mailing list