When using a self-built compiler on an Apple Silicon host to build a x86_64-unknown-none static library, mach-o-arm64 objects get mixed into the output. This happens since #103732.
Problem setup
# config.toml
# using stage1, built with `./x.py build`
changelog-seen = 2
[llvm]
targets = "AArch64;X86"
[build]
target = [
"aarch64-apple-darwin",
"x86_64-unknown-none",
]
[rust]
llvm-tools = true
lld = true
host: aarch64-apple-darwin
// foo.rs
#![no_std]
#[panic_handler]
fn panic(_: &core::panic::PanicInfo) -> ! {
loop {}
}
$ rustc --crate-type staticlib --target x86_64-unknown-none foo.rs
$ objdump --archive-headers libfoo.a
Results
- 33b530e
- 5984b1d (the next commit)
- 5984b1d.log
- contains
absvdi2.o: file format mach-o-arm64 and more
nightly-2022-11-01 (the next nightly)
CC: @stlankes
When using a self-built compiler on an Apple Silicon host to build a
x86_64-unknown-nonestatic library,mach-o-arm64objects get mixed into the output. This happens since #103732.Problem setup
Results
mach-o-arm64filesabsvdi2.o: file format mach-o-arm64and morenightly-2022-11-01(the next nightly)mach-o-arm64filesCC: @stlankes