Skip to content

Commit

Permalink
Fix change detection of linker script on build files
Browse files Browse the repository at this point in the history
In 7b59c9e
linker scripts have been moved in the ld/ sub-folder for every target.
The change detection path in build.rs of every target hasn't been updated, resulting in
the build script running at every code change, rather than only when there's a change in memory.x
  • Loading branch information
AnthonyGrondin authored and jessebraham committed Aug 18, 2022
1 parent 2fe2753 commit ede5007
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion esp32-hal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");
}

fn generate_memory_extras() -> Vec<u8> {
Expand Down
4 changes: 2 additions & 2 deletions esp32c3-hal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");

add_defaults();
}
Expand Down Expand Up @@ -57,7 +57,7 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");

add_defaults();
}
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");
}
4 changes: 2 additions & 2 deletions esp32s3-hal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");
}

#[cfg(feature = "direct-boot")]
Expand Down Expand Up @@ -69,5 +69,5 @@ fn main() {

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=ld/memory.x");
}

0 comments on commit ede5007

Please sign in to comment.