about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2019-05-20 12:27:15 -0700
committerPetr Hosek <phosek@google.com>2019-05-20 12:29:58 -0700
commitd8f764bbbf10cdccfde48f0a6b7dfdea157b5568 (patch)
tree143278547ee98a7e7a30aea355ae56f436b817b8
parentd35181ad8785fa958e43580a29a982afe02c728f (diff)
downloadrust-d8f764bbbf10cdccfde48f0a6b7dfdea157b5568.tar.gz
rust-d8f764bbbf10cdccfde48f0a6b7dfdea157b5568.zip
Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind
These are required otherwise libunwind will end up with undefined
references to __gxx_personality_v0 which is provided by C++ ABI
library and that's undesirable.
-rw-r--r--src/libunwind/build.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index 70f591e653b..20280aa3c41 100644
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -67,13 +67,10 @@ mod llvm_libunwind {
             cfg.flag("-std=c99");
             cfg.flag("-std=c++11");
             cfg.flag("-nostdinc++");
-            if cfg.is_flag_supported("-funwind-tables").unwrap_or_default() &&
-               cfg.is_flag_supported("-fno-exceptions").unwrap_or_default() {
-                cfg.flag("-funwind-tables");
-                cfg.flag("-fno-exceptions");
-            }
+            cfg.flag("-fno-exceptions");
             cfg.flag("-fno-rtti");
             cfg.flag("-fstrict-aliasing");
+            cfg.flag("-funwind-tables");
         }
 
         let mut unwind_sources = vec![