Skip to content

Commit

Permalink
Set -funwind-tables and -fno-exceptions unconditionally for LLVM's li…
Browse files Browse the repository at this point in the history
…bunwind

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.
  • Loading branch information
petrhosek committed May 20, 2019
1 parent d35181a commit d8f764b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libunwind/build.rs
Expand Up @@ -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![
Expand Down

0 comments on commit d8f764b

Please sign in to comment.