Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 53d2662

Browse files
Rerun build script when archive changes
Fixes #236
1 parent e48af90 commit 53d2662

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

build.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ fn main() {
1919
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
2020

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

3028
// Put the linker script somewhere the linker can find it

0 commit comments

Comments
 (0)