build: 🛠 Support per-binary linker scripts

This commit is contained in:
Berkus Decker 2021-12-05 19:48:20 +02:00
parent 721af870bf
commit 1e17e03a8d
2 changed files with 6 additions and 1 deletions

6
nucleus/build.rs Normal file
View File

@ -0,0 +1,6 @@
const LINKER_SCRIPT: &str = "linker/aarch64.ld";
fn main() {
println!("cargo:rerun-if-changed={}", LINKER_SCRIPT);
println!("cargo:rustc-link-arg=--script={}", LINKER_SCRIPT);
}

View File

@ -11,7 +11,6 @@
"linker": "rust-lld",
"pre-link-args": {
"ld.lld": [
"--script=linker/aarch64.ld",
"--print-gc-sections"
]
},