Skip to content

Commit cb678b9

Browse files
committed
Auto merge of #141375 - kraj:kraj/aarch64-musl, r=Mark-Simulacrum
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
2 parents 04a67d5 + 56b669c commit cb678b9

File tree

1 file changed

+1
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,7 @@ impl Step for Libunwind {
14301430
cfg.flag("-funwind-tables");
14311431
cfg.flag("-fvisibility=hidden");
14321432
cfg.define("_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS", None);
1433+
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1");
14331434
cfg.include(root.join("include"));
14341435
cfg.cargo_metadata(false);
14351436
cfg.out_dir(&out_dir);
@@ -1447,12 +1448,10 @@ impl Step for Libunwind {
14471448
cfg.define("__NO_STRING_INLINES", None);
14481449
cfg.define("__NO_MATH_INLINES", None);
14491450
cfg.define("_LIBUNWIND_IS_BAREMETAL", None);
1450-
cfg.define("__LIBUNWIND_IS_NATIVE_ONLY", None);
14511451
cfg.define("NDEBUG", None);
14521452
}
14531453
if self.target.is_windows() {
14541454
cfg.define("_LIBUNWIND_HIDE_SYMBOLS", "1");
1455-
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1");
14561455
}
14571456
}
14581457

0 commit comments

Comments
 (0)