Files
FoundryOS/kernel/build.rs
T
2025-02-19 16:49:10 +00:00

7 lines
289 B
Rust

fn main() {
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
// Tell cargo to pass the linker script to the linker..
println!("cargo:rustc-link-arg=-Tlinker-{arch}.ld");
// ..and to re-run if it changes.
println!("cargo:rerun-if-changed=linker-{arch}.ld");
}