[libunwind] 05598e3 - [libunwind] Fix linker flag handling in the tests.
Daniel Kiss via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 29 06:02:52 PDT 2020
Author: Daniel Kiss
Date: 2020-10-29T14:02:44+01:00
New Revision: 05598e3d3047cf028cc3e61f3268ff7d999e5f26
URL: https://github.com/llvm/llvm-project/commit/05598e3d3047cf028cc3e61f3268ff7d999e5f26
DIFF: https://github.com/llvm/llvm-project/commit/05598e3d3047cf028cc3e61f3268ff7d999e5f26.diff
LOG: [libunwind] Fix linker flag handling in the tests.
--export-dynamic is not always available on all targets.
-funwind-tables was a duplicate in the lit.site.cfg.in.
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D90202
Added:
Modified:
libunwind/test/libunwind/test/config.py
libunwind/test/lit.site.cfg.in
Removed:
################################################################################
diff --git a/libunwind/test/libunwind/test/config.py b/libunwind/test/libunwind/test/config.py
index 977f9a0fb3f9..9231860fc622 100644
--- a/libunwind/test/libunwind/test/config.py
+++ b/libunwind/test/libunwind/test/config.py
@@ -43,6 +43,9 @@ def configure_compile_flags(self):
# Stack unwinding tests need unwinding tables and these are not
# generated by default on all Targets.
self.cxx.compile_flags += ['-funwind-tables']
+ # Make symbols available in the tests.
+ if 'linux' in self.config.target_triple:
+ self.cxx.link_flags += ['-Wl,--export-dynamic']
if not self.get_lit_bool('enable_threads', True):
self.cxx.compile_flags += ['-D_LIBUNWIND_HAS_NO_THREADS']
self.config.available_features.add('libunwind-no-threads')
diff --git a/libunwind/test/lit.site.cfg.in b/libunwind/test/lit.site.cfg.in
index 84dae3c2bfb0..8ff770fe29bc 100644
--- a/libunwind/test/lit.site.cfg.in
+++ b/libunwind/test/lit.site.cfg.in
@@ -44,10 +44,6 @@ config.test_source_root = os.path.join(config.libunwind_src_root, 'test')
# Allow expanding substitutions that are based on other substitutions
config.recursiveExpansionLimit = 10
-# Make symbols available in the tests.
-config.test_compiler_flags += " -funwind-tables "
-config.test_linker_flags += " -Wl,--export-dynamic "
-
# Infer the test_exec_root from the build directory.
config.test_exec_root = os.path.join(config.libunwind_obj_root, 'test')
More information about the cfe-commits
mailing list