]> git.lizzy.rs Git - rust.git/blob - build.rs
rustc_hir_typeck: fix clippy
[rust.git] / build.rs
1 fn main() {
2     // Forward the profile to the main compilation
3     println!("cargo:rustc-env=PROFILE={}", std::env::var("PROFILE").unwrap());
4     // Don't rebuild even if nothing changed
5     println!("cargo:rerun-if-changed=build.rs");
6     // forward git repo hashes we build at
7     println!(
8         "cargo:rustc-env=GIT_HASH={}",
9         rustc_tools_util::get_commit_hash().unwrap_or_default()
10     );
11     println!(
12         "cargo:rustc-env=COMMIT_DATE={}",
13         rustc_tools_util::get_commit_date().unwrap_or_default()
14     );
15     println!(
16         "cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
17         rustc_tools_util::get_channel()
18     );
19 }