Skip to content

Add fp-armv8 target feature on macOS - #1732

Merged
bjorn3 merged 1 commit into
rust-lang:mainfrom
arifd:aarch64-macos-fp-armv8
Nov 23, 2026
Merged

bjorn3 merged 1 commit into
rust-lang:mainfrom
arifd:aarch64-macos-fp-armv8

Conversation

@arifd

@arifd arifd commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Related: #t-compiler > Cranelift fp-armv8 ABI warnings on Apple Silicon

Create a hello world source file:

echo 'fn main() { println!("Hello, world!"); }' > /tmp/hello.rs

before this PR:

rustc +nightly \
  -Zcodegen-backend=cranelift \
  /tmp/hello.rs \
  -o /tmp/hello-original

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `std` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `core` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `alloc` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `compiler_builtins` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `libc` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `rustc_std_workspace_core` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `unwind` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `miniz_oxide` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `adler2` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `hashbrown` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `rustc_std_workspace_alloc` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `std_detect` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `rustc_demangle` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `cfg_if` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `addr2line` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `gimli` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `object` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `memchr` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: mixing target features may cause an ABI mismatch in crate `hello`
 |
 = help: some target features modify the ABI so Rust crates compiled with different values for these target features cannot be used together safely
 = help: the target feature fp-armv8 is enabled in `panic_unwind` but disabled in this crate
 = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=target-feature` to silence this warning

warning: 19 warnings emitted

After this PR:

rustc +nightly-2026-11-20 \
  -Zcodegen-backend="$PWD/build/cg_clif/aarch64-apple-darwin/release/librustc_codegen_cranelift.dylib" \
  /tmp/hello.rs \
  -o /tmp/hello

@bjorn3

bjorn3 commented Nov 23, 2026

Copy link
Copy Markdown
Member

Thanks! @lqd opened a PR just a couple of minutes earlier: #1731 I will merge your PR once CI passes rather than the other one given that you are the original reporter of this issue and already posted this fix on Zulip a couple of days ago.

@bjorn3
bjorn3 merged commit 5cb374a into rust-lang:main Nov 23, 2026
26 checks passed
@arifd
arifd deleted the aarch64-macos-fp-armv8 branch November 23, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants