diff --git a/libunwind/test/libunwind/test/config.py b/libunwind/test/libunwind/test/config.py --- a/libunwind/test/libunwind/test/config.py +++ b/libunwind/test/libunwind/test/config.py @@ -43,6 +43,9 @@ # 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 --- a/libunwind/test/lit.site.cfg.in +++ b/libunwind/test/lit.site.cfg.in @@ -44,10 +44,6 @@ # 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')