Skip to content

Commit

Permalink
Rerun build script when archive changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Nov 22, 2021
1 parent 008fd73 commit 88d9b7e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cortex-m-rt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());

if target.starts_with("thumbv") {
fs::copy(
format!("bin/{}.a", target),
out_dir.join("libcortex-m-rt.a"),
)
.unwrap();
let lib_path = format!("bin/{}.a", target);
fs::copy(&lib_path, out_dir.join("libcortex-m-rt.a")).unwrap();
println!("cargo:rustc-link-lib=static=cortex-m-rt");
println!("cargo:rerun-if-changed={}", lib_path);
}

// Put the linker script somewhere the linker can find it
Expand Down

0 comments on commit 88d9b7e

Please # to comment.