[PATCH] D90202: [libunwind] Fix linker flag handling in the tests.

Daniel Kiss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 06:02:52 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG05598e3d3047: [libunwind] Fix linker flag handling in the tests. (authored by danielkiss).
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added a reviewer: libunwind.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90202/new/

https://reviews.llvm.org/D90202

Files:
  libunwind/test/libunwind/test/config.py
  libunwind/test/lit.site.cfg.in


Index: libunwind/test/lit.site.cfg.in
===================================================================
--- libunwind/test/lit.site.cfg.in
+++ 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')
 
Index: libunwind/test/libunwind/test/config.py
===================================================================
--- libunwind/test/libunwind/test/config.py
+++ 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')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90202.301591.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201029/40ea2917/attachment.bin>


More information about the llvm-commits mailing list