about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-21 21:22:26 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-07-22 22:04:13 -0700
commit02219642bc5e8a9454ff4d6c6b0ede16a321ab9d (patch)
tree29de075e5d359b5a8b60c5e57416f73befa75398 /src/libsyntax
parentef19bd1a339212f77160f12af6d5d85d8bb36ea4 (diff)
downloadrust-02219642bc5e8a9454ff4d6c6b0ede16a321ab9d.tar.gz
rust-02219642bc5e8a9454ff4d6c6b0ede16a321ab9d.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/build.rs15
1 files changed, 15 insertions, 0 deletions
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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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");
+}