Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 033a025

Browse files
committed
Don't rerun the build script for the compiler each time on linux
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.
1 parent c396bb3 commit 033a025

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc/build.rs

Lines changed: 3 additions & 0 deletions
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)