[libunwind] r316657 - [libunwind] Always use unwind tables in tests

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 05:02:03 PDT 2017


Author: psmith
Date: Thu Oct 26 05:02:03 2017
New Revision: 316657

URL: http://llvm.org/viewvc/llvm-project?rev=316657&view=rev
Log:
[libunwind] Always use unwind tables in tests
    
For many targets setting -fno-exceptions will prevent unwinding tables from
being generated for the test programs. As libunwind depends on the tables to
unwind the stack several tests will fail.

This change always adds -funwind-tables so that even when -fno-exceptions
is set unwind tables are generated.

fixes PR33858

Differential Revision: https://reviews.llvm.org/D37484


Modified:
    libunwind/trunk/test/libunwind/test/config.py

Modified: libunwind/trunk/test/libunwind/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/test/libunwind/test/config.py?rev=316657&r1=316656&r2=316657&view=diff
==============================================================================
--- libunwind/trunk/test/libunwind/test/config.py (original)
+++ libunwind/trunk/test/libunwind/test/config.py Thu Oct 26 05:02:03 2017
@@ -43,10 +43,11 @@ class Configuration(LibcxxConfiguration)
 
     def configure_compile_flags(self):
         self.cxx.compile_flags += ['-DLIBUNWIND_NO_TIMER']
-        if self.get_lit_bool('enable_exceptions', True):
-            self.cxx.compile_flags += ['-funwind-tables']
-        else:
+        if not self.get_lit_bool('enable_exceptions', True):
             self.cxx.compile_flags += ['-fno-exceptions', '-DLIBUNWIND_HAS_NO_EXCEPTIONS']
+        # Stack unwinding tests need unwinding tables and these are not
+        # generated by default on all Targets.
+        self.cxx.compile_flags += ['-funwind-tables']
         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')




More information about the cfe-commits mailing list