-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Disable libunwind cross-architecture unwinding #141375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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 <raj.khem@gmail.com>
rustbot has assigned @Mark-Simulacrum. Use |
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
This is the error that happens when compiling rust for aarch64/musl using clang compiler with
/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/wrapper/target-rust-cc is
|
Gentoo has a similar bug report - https://bugs.gentoo.org/950171 |
@@ -1454,6 +1454,9 @@ impl Step for Libunwind { | |||
cfg.define("_LIBUNWIND_HIDE_SYMBOLS", "1"); | |||
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1"); | |||
} | |||
if self.target.starts_with("aarch64") && self.target.contains("musl") { | |||
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be enabled on all targets except fortanix?
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