diff options
| author | Petr Hosek <phosek@google.com> | 2019-05-20 12:27:15 -0700 |
|---|---|---|
| committer | Petr Hosek <phosek@google.com> | 2019-05-20 12:29:58 -0700 |
| commit | d8f764bbbf10cdccfde48f0a6b7dfdea157b5568 (patch) | |
| tree | 143278547ee98a7e7a30aea355ae56f436b817b8 | |
| parent | d35181ad8785fa958e43580a29a982afe02c728f (diff) | |
| download | rust-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.rs | 7 |
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