Skip to content

Commit d8f764b

Browse files
committed
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.
1 parent d35181a commit d8f764b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/libunwind/build.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ mod llvm_libunwind {
6767
cfg.flag("-std=c99");
6868
cfg.flag("-std=c++11");
6969
cfg.flag("-nostdinc++");
70-
if cfg.is_flag_supported("-funwind-tables").unwrap_or_default() &&
71-
cfg.is_flag_supported("-fno-exceptions").unwrap_or_default() {
72-
cfg.flag("-funwind-tables");
73-
cfg.flag("-fno-exceptions");
74-
}
70+
cfg.flag("-fno-exceptions");
7571
cfg.flag("-fno-rtti");
7672
cfg.flag("-fstrict-aliasing");
73+
cfg.flag("-funwind-tables");
7774
}
7875

7976
let mut unwind_sources = vec![

0 commit comments

Comments
 (0)