Skip to content

Commit

Permalink
Rollup merge of #60983 - petrhosek:libunwind-no-exceptions, r=alexcri…
Browse files Browse the repository at this point in the history
…chton

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.
  • Loading branch information
Centril authored May 20, 2019
2 parents 44b5d4d + d8f764b commit 0c97800
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libunwind/build.rs
Original file line number Diff line number Diff line change
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 0c97800

Please sign in to comment.