2018-07-05 12:37:50 +02:00
|
|
|
//! This build script ensures that Clippy is not compiled with an
|
2018-05-07 21:01:23 +02:00
|
|
|
//! incompatible version of rust. It will panic with a descriptive
|
|
|
|
//! error message instead.
|
|
|
|
//!
|
2018-07-05 12:37:50 +02:00
|
|
|
//! We specifially want to ensure that Clippy is only built with a
|
2018-05-07 21:01:23 +02:00
|
|
|
//! rustc version that is newer or equal to the one specified in the
|
|
|
|
//! `min_version.txt` file.
|
|
|
|
//!
|
|
|
|
//! `min_version.txt` is in the repo but also in the `.gitignore` to
|
|
|
|
//! make sure that it is not updated manually by accident. Only CI
|
|
|
|
//! should update that file.
|
|
|
|
//!
|
|
|
|
//! This build script was originally taken from the Rocket web framework:
|
|
|
|
//! https://github.com/SergioBenitez/Rocket
|
|
|
|
|
2018-05-22 10:21:42 +02:00
|
|
|
use std::env;
|
2017-09-18 12:47:33 +02:00
|
|
|
|
|
|
|
fn main() {
|
2018-05-13 10:11:52 +02:00
|
|
|
// Forward the profile to the main compilation
|
|
|
|
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
|
|
|
|
// Don't rebuild even if nothing changed
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
|
|
}
|