Auto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry
Make libunwind build hermetic We want to avoid exporting any symbols from Rust's version of libunwind, and to do so we need to disable visibility annotations to make sure that the -fvisibility=hidden has effect, and also hide global new/delete. This matches the CMake build of libunwind.
This commit is contained in:
commit
6f48888456
@ -90,6 +90,8 @@ pub fn compile() {
|
|||||||
cfg.flag("-fstrict-aliasing");
|
cfg.flag("-fstrict-aliasing");
|
||||||
cfg.flag("-funwind-tables");
|
cfg.flag("-funwind-tables");
|
||||||
cfg.flag("-fvisibility=hidden");
|
cfg.flag("-fvisibility=hidden");
|
||||||
|
cfg.flag_if_supported("-fvisibility-global-new-delete-hidden");
|
||||||
|
cfg.define("_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS", None);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut unwind_sources = vec![
|
let mut unwind_sources = vec![
|
||||||
|
Loading…
Reference in New Issue
Block a user