diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-01-14 19:29:04 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-01-14 19:29:04 +0000 |
commit | fd41e2f946ec70e7ef2bd702ac8a56de97957e7b (patch) | |
tree | 2aed75eda8bf0536d43c0908a3bb1dc038ff160e | |
parent | a0afb55ff92db16fe6b35740871b73cd54942e02 (diff) | |
download | bcm5719-llvm-fd41e2f946ec70e7ef2bd702ac8a56de97957e7b.tar.gz bcm5719-llvm-fd41e2f946ec70e7ef2bd702ac8a56de97957e7b.zip |
Support picking the unwinder used for testing on linux (just as libc++abi testing allows)
llvm-svn: 226024
-rw-r--r-- | libcxx/test/libcxx/test/config.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 92b00049283..d497c2d5461 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -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: |