Open
Description
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
- 33b530e.log
- does not contain any
mach-o-arm64
files
- 5984b1d (the next commit)
- 5984b1d.log
- contains
absvdi2.o: file format mach-o-arm64
and more
nightly-2022-11-01
(the next nightly)- nightly-2022-11-01.log
- does not contain any
mach-o-arm64
files
CC: @stlankes