From 02219642bc5e8a9454ff4d6c6b0ede16a321ab9d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 21 Jul 2017 21:22:26 -0700 Subject: rustc: Add some build scripts for librustc crates This commit adds some "boilerplate" build scripts to librustc/libsyntax crates to declare dependencies on various environment variables that are configured throughout the build. Cargo recently gained the ability to depend on environment variables in build scripts which can help trigger recompilation of a crate. This should fix weird bugs where after you make a commit or a few days later you'll get weird "not built with the same compiler" errors hopefully. --- src/libsyntax/build.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/libsyntax/build.rs (limited to 'src/libsyntax') diff --git a/src/libsyntax/build.rs b/src/libsyntax/build.rs new file mode 100644 index 00000000000..d39340c3326 --- /dev/null +++ b/src/libsyntax/build.rs @@ -0,0 +1,15 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL"); + println!("cargo:rerun-if-env-changed=CFG_DISABLE_UNSTABLE_FEATURES"); +} -- cgit 1.4.1-3-g733a5