Skip to content

Commit 1679d1c

Browse files
authored
Rollup merge of rust-lang#99145 - jyn514:dont-rerun-build-script, r=wesleywiser
Don't rerun the build script for the compiler each time on non-windows platforms In practice, this doesn't matter very much because the script takes ~no time to run. But this makes `CARGO_LOG=info` easier to read, and theoretically saves a few milliseconds.
2 parents 24d241a + 033a025 commit 1679d1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ fn main() {
55
let target_env = env::var("CARGO_CFG_TARGET_ENV");
66
if Ok("windows") == target_os.as_deref() && Ok("msvc") == target_env.as_deref() {
77
set_windows_exe_options();
8+
} else {
9+
// Avoid rerunning the build script every time.
10+
println!("cargo:rerun-if-changed=build.rs");
811
}
912
}
1013

0 commit comments

Comments
 (0)