Skip to content

Commit ecc0a33

Browse files
committed
Disable libunwind cross-architecture unwinding
Building with _LIBUNWIND_IS_NATIVE_ONLY disables code for cross-architecture unwinding It also enables some additional code that handles PAC-specific unwind info it helps compiling with the -mbranch-protection=pac or -mbranch-protection=standard flags This fixes build with clang/musl on aarch64 Signed-off-by: Khem Raj <[email protected]>
1 parent bf64d66 commit ecc0a33

File tree

1 file changed

+3
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-0
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,9 @@ impl Step for Libunwind {
14541454
cfg.define("_LIBUNWIND_HIDE_SYMBOLS", "1");
14551455
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1");
14561456
}
1457+
if self.target.starts_with("aarch64") && self.target.contains("musl") {
1458+
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1");
1459+
}
14571460
}
14581461

14591462
cc_cfg.compiler(builder.cc(self.target));

0 commit comments

Comments
 (0)