]> git.lizzy.rs Git - rust.git/commitdiff
make ignore-git true by default when channel is dev
authorJeremySorensen <jeremy.a.sorensen@gmail.com>
Wed, 16 Aug 2017 01:26:29 +0000 (18:26 -0700)
committerJeremySorensen <jeremy.a.sorensen@gmail.com>
Wed, 16 Aug 2017 01:39:58 +0000 (18:39 -0700)
config.toml.example
src/bootstrap/config.rs

index 962be2e608501659cfafe2e0a7d559e1a0c1263a..bae36ed925fe45598f9c3bc6ec259740facc58d0 100644 (file)
 #codegen-tests = true
 
 # Flag indicating whether git info will be retrieved from .git automatically.
-#ignore-git = false
+# Having the git information can cause a lot of rebuilds during development.
+# Note: If this attribute is not explicity set (e.g. it left commented out) it
+# will default to true if channel = "dev", but will default to false otherwise.
+#ignore-git = true
 
 # =============================================================================
 # Options for specific targets
index aa688fc66e267831e71a7a3824720cdc8aa6ea8f..f284bafd2d67e6f52abd06893a752df72aa3426b 100644 (file)
@@ -296,7 +296,7 @@ pub fn parse(args: &[String]) -> Config {
         config.rust_codegen_units = 1;
         config.channel = "dev".to_string();
         config.codegen_tests = true;
-        config.ignore_git = false;
+        config.ignore_git = true;
         config.rust_dist_src = true;
 
         config.on_fail = flags.on_fail;
@@ -419,7 +419,12 @@ pub fn parse(args: &[String]) -> Config {
             set(&mut config.use_jemalloc, rust.use_jemalloc);
             set(&mut config.backtrace, rust.backtrace);
             set(&mut config.channel, rust.channel.clone());
+
+            // on the dev channel, ignore_git should be true by default
+            // on other channels it should be false by default
+            config.ignore_git = config.channel == "dev";
             set(&mut config.ignore_git, rust.ignore_git);
+
             config.rustc_default_linker = rust.default_linker.clone();
             config.rustc_default_ar = rust.default_ar.clone();
             config.musl_root = rust.musl_root.clone().map(PathBuf::from);