build.rs: aarch64: Specify target for cc::Build

Oddly, not specifying this or using aarch64-unknown-none (which would be
the default that cc gets from the TARGET environment variable) both
fail to invoke the appropriate compiler to build the asm code.

Using aarch64-unknown-redox works but shouldn't really be needed. This
is perhaps because of some odd arrangement of KTARGET, TARGET, the
installed prefix toolchain and the kernel target JSON spec.

The early_init asm code shall be replaced by a pure Rust bootloader
eventually so let's move with this for the moment.
This commit is contained in:
Robin Randhawa
2021-01-15 12:25:42 +00:00
committed by Jeremy Soller
parent 02c37d3fae
commit ea21fba3aa

View File

@@ -166,6 +166,7 @@ mod gen {
println!("cargo:rerun-if-changed=src/arch/aarch64/init/pre_kstart/early_init.S");
cc::Build::new()
.file("src/arch/aarch64/init/pre_kstart/early_init.S")
.target("aarch64-unknown-redox")
.compile("early_init");
}
}