From 7bccd087d1c6e2b090be7ec0ad10d56a0f730332 Mon Sep 17 00:00:00 2001 From: Anthony Grondin <104731965+AnthonyGrondin@users.noreply.github.com> Date: Wed, 17 Aug 2022 23:26:25 -0400 Subject: [PATCH] Fix change detection of linker script on build files In https://github.com/esp-rs/esp-hal/commit/7b59c9e76d42372fb74a4db0bff0394e3347e0f2 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 --- esp32-hal/build.rs | 2 +- esp32c3-hal/build.rs | 4 ++-- esp32s2-hal/build.rs | 2 +- esp32s3-hal/build.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/esp32-hal/build.rs b/esp32-hal/build.rs index ae04bba5573..1c816dc7489 100644 --- a/esp32-hal/build.rs +++ b/esp32-hal/build.rs @@ -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 { diff --git a/esp32c3-hal/build.rs b/esp32c3-hal/build.rs index c8b5991da4b..5f8f4403b21 100644 --- a/esp32c3-hal/build.rs +++ b/esp32c3-hal/build.rs @@ -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(); } @@ -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(); } diff --git a/esp32s2-hal/build.rs b/esp32s2-hal/build.rs index e057c9ce098..ee29e3235a8 100644 --- a/esp32s2-hal/build.rs +++ b/esp32s2-hal/build.rs @@ -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"); } diff --git a/esp32s3-hal/build.rs b/esp32s3-hal/build.rs index d5b4221cd48..bcd4d725272 100644 --- a/esp32s3-hal/build.rs +++ b/esp32s3-hal/build.rs @@ -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")] @@ -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"); }