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
8 "cargo:rustc-env=GIT_HASH={}",
9 rustc_tools_util::get_commit_hash().unwrap_or_default()
12 "cargo:rustc-env=COMMIT_DATE={}",
13 rustc_tools_util::get_commit_date().unwrap_or_default()
16 "cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
17 rustc_tools_util::get_channel().unwrap_or_default()