From 66311005ae22c8adf3d488cef399e78340a4c25b Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 20 Oct 2022 15:12:27 +0800 Subject: [PATCH] xtask: builder: remove LAST_CONFIG We now use build flags to decide which version of utralib to use. This makes `LAST_CONFIG` obsolete, since the version of utralib is decided using a hash of build configs and build flags. Signed-off-by: Sean Cross --- xtask/src/builder.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index fd5a8a9bd..8471ee44e 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -433,35 +433,6 @@ impl Builder { return Err("Target unknown: please check your UTRA target".into()); }; - // LAST_CONFIG tracks the last SVD configuration. It's used by utralib to track if it - // should rebuild itself based on a change in SVD configs. Note that for some reason - // it takes two consecutive builds with the same SVD config before the build system - // figures out that it doesn't need to rebuild everything. After then, it behaves as expected. - let last_config = format!("target/{}/{}/build/LAST_CONFIG", TARGET_TRIPLE, self.stream.to_str()); - std::fs::create_dir_all(format!("target/{}/{}/build/", TARGET_TRIPLE, self.stream.to_str())).unwrap(); - let changed = match OpenOptions::new() - .read(true) - .open(&last_config) { - Ok(mut file) => { - let mut contents = String::new(); - file.read_to_string(&mut contents).unwrap(); - if contents != self.utra_target { - true - } else { - false - } - } - _ => true - }; - if changed { - let mut file = OpenOptions::new() - .create(true) - .write(true) - .truncate(true) - .open(&last_config).unwrap(); - write!(file, "{}", self.utra_target).unwrap(); - } - // ------ build the services & apps ------ let mut app_names = Vec::::new(); for app in self.apps.iter() {