use std::path::Path; fn main() { let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); let ld_script_path = manifest_dir.join("stage1.ld"); println!("cargo:rustc-link-arg=--script={}", ld_script_path.display()); }