From d8f764bbbf10cdccfde48f0a6b7dfdea157b5568 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 20 May 2019 12:27:15 -0700 Subject: [PATCH] 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. --- src/libunwind/build.rs | 7 ++----- 1 file 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 @@ pub fn compile() { 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![ -- 2.44.0