about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2020-03-23 14:13:54 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2020-03-24 12:08:30 +1100
commit46c8a2c26eee8148e47237e90efde558d1374580 (patch)
tree2e0e87354ab4de06b32b8eda5ca2bdea4558878f /src
parenta3782671cf1e190ffa470128a53329177b2c9a2f (diff)
downloadrust-46c8a2c26eee8148e47237e90efde558d1374580.tar.gz
rust-46c8a2c26eee8148e47237e90efde558d1374580.zip
Remove `-Z incremental`.
`-C incremental` was introduced over two years ago. `-Z incremental` was
kept for transitioning, but it's been long enough now that it should be
ok to remove it.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_interface/tests.rs2
-rw-r--r--src/librustc_session/config.rs29
-rw-r--r--src/librustc_session/options.rs2
-rw-r--r--src/test/codegen-units/partitioning/extern-drop-glue.rs4
-rw-r--r--src/test/codegen-units/partitioning/extern-generic.rs4
-rw-r--r--src/test/codegen-units/partitioning/inlining-from-extern-crate.rs4
-rw-r--r--src/test/codegen-units/partitioning/local-drop-glue.rs4
-rw-r--r--src/test/codegen-units/partitioning/local-generic.rs4
-rw-r--r--src/test/codegen-units/partitioning/local-inlining-but-not-all.rs4
-rw-r--r--src/test/codegen-units/partitioning/local-inlining.rs4
-rw-r--r--src/test/codegen-units/partitioning/local-transitive-inlining.rs4
-rw-r--r--src/test/codegen-units/partitioning/methods-are-with-self-type.rs4
-rw-r--r--src/test/codegen-units/partitioning/regular-modules.rs4
-rw-r--r--src/test/codegen-units/partitioning/shared-generics.rs2
-rw-r--r--src/test/codegen-units/partitioning/statics.rs4
-rw-r--r--src/test/codegen-units/partitioning/vtable-through-const.rs4
-rw-r--r--src/tools/compiletest/src/runtest.rs6
17 files changed, 29 insertions, 60 deletions
diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs
index 935b1e00ed6..6a6d0a8f061 100644
--- a/src/librustc_interface/tests.rs
+++ b/src/librustc_interface/tests.rs
@@ -546,8 +546,6 @@ fn test_debugging_options_tracking_hash() {
     assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
     opts.debugging_opts.parse_only = true;
     assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
-    opts.debugging_opts.incremental = Some(String::from("abc"));
-    assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
     opts.debugging_opts.dump_dep_graph = true;
     assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
     opts.debugging_opts.query_dep_graph = true;
diff --git a/src/librustc_session/config.rs b/src/librustc_session/config.rs
index 6c4d70c09a3..663cfa223c7 100644
--- a/src/librustc_session/config.rs
+++ b/src/librustc_session/config.rs
@@ -1286,33 +1286,6 @@ fn check_thread_count(debugging_opts: &DebuggingOptions, error_format: ErrorOutp
     }
 }
 
-fn select_incremental_path(
-    debugging_opts: &DebuggingOptions,
-    cg: &CodegenOptions,
-    error_format: ErrorOutputType,
-) -> Option<PathBuf> {
-    match (&debugging_opts.incremental, &cg.incremental) {
-        (Some(path1), Some(path2)) => {
-            if path1 != path2 {
-                early_error(
-                    error_format,
-                    &format!(
-                        "conflicting paths for `-Z incremental` and \
-                         `-C incremental` specified: {} versus {}",
-                        path1, path2
-                    ),
-                );
-            } else {
-                Some(path1)
-            }
-        }
-        (Some(path), None) => Some(path),
-        (None, Some(path)) => Some(path),
-        (None, None) => None,
-    }
-    .map(PathBuf::from)
-}
-
 fn collect_print_requests(
     cg: &mut CodegenOptions,
     dopts: &mut DebuggingOptions,
@@ -1677,7 +1650,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
 
     check_thread_count(&debugging_opts, error_format);
 
-    let incremental = select_incremental_path(&debugging_opts, &cg, error_format);
+    let incremental = cg.incremental.as_ref().map(|m| PathBuf::from(m));
 
     if debugging_opts.profile && incremental.is_some() {
         early_error(
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs
index f4d4c095368..72c720d09b0 100644
--- a/src/librustc_session/options.rs
+++ b/src/librustc_session/options.rs
@@ -789,8 +789,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "support compiling tests with panic=abort"),
     dep_tasks: bool = (false, parse_bool, [UNTRACKED],
         "print tasks that execute and the color their dep node gets (requires debug build)"),
-    incremental: Option<String> = (None, parse_opt_string, [UNTRACKED],
-        "enable incremental compilation (experimental)"),
     incremental_info: bool = (false, parse_bool, [UNTRACKED],
         "print high-level information about incremental reuse (or the lack thereof)"),
     incremental_verify_ich: bool = (false, parse_bool, [UNTRACKED],
diff --git a/src/test/codegen-units/partitioning/extern-drop-glue.rs b/src/test/codegen-units/partitioning/extern-drop-glue.rs
index 662519067d7..1cb85382239 100644
--- a/src/test/codegen-units/partitioning/extern-drop-glue.rs
+++ b/src/test/codegen-units/partitioning/extern-drop-glue.rs
@@ -1,9 +1,9 @@
 // ignore-tidy-linelength
 
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
 // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/extern-drop-glue
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/extern-drop-glue
 // compile-flags:-Zinline-in-all-cgus -Copt-level=0
 
 #![allow(dead_code)]
diff --git a/src/test/codegen-units/partitioning/extern-generic.rs b/src/test/codegen-units/partitioning/extern-generic.rs
index c96c54312fb..88d6116a987 100644
--- a/src/test/codegen-units/partitioning/extern-generic.rs
+++ b/src/test/codegen-units/partitioning/extern-generic.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y
+// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y
 
 #![allow(dead_code)]
 #![crate_type="lib"]
diff --git a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs b/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs
index e943f54a406..7afeb0a0f36 100644
--- a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs
+++ b/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/inlining-from-extern-crate
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/inlining-from-extern-crate
 // compile-flags:-Zinline-in-all-cgus
 
 #![crate_type="lib"]
diff --git a/src/test/codegen-units/partitioning/local-drop-glue.rs b/src/test/codegen-units/partitioning/local-drop-glue.rs
index 14a50bf5798..c082b408278 100644
--- a/src/test/codegen-units/partitioning/local-drop-glue.rs
+++ b/src/test/codegen-units/partitioning/local-drop-glue.rs
@@ -1,8 +1,8 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
 // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-drop-glue
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-drop-glue
 // compile-flags:-Zinline-in-all-cgus -Copt-level=0
 
 #![allow(dead_code)]
diff --git a/src/test/codegen-units/partitioning/local-generic.rs b/src/test/codegen-units/partitioning/local-generic.rs
index dcff638b0b1..4518166a1c9 100644
--- a/src/test/codegen-units/partitioning/local-generic.rs
+++ b/src/test/codegen-units/partitioning/local-generic.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/local-generic
+// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/local-generic
 
 #![allow(dead_code)]
 #![crate_type="lib"]
diff --git a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs b/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
index 18211fad31e..6322f55d2b7 100644
--- a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
+++ b/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining-but-not-all
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining-but-not-all
 // compile-flags:-Zinline-in-all-cgus=no
 
 #![allow(dead_code)]
diff --git a/src/test/codegen-units/partitioning/local-inlining.rs b/src/test/codegen-units/partitioning/local-inlining.rs
index 7aa83e4bf41..d75dfc91262 100644
--- a/src/test/codegen-units/partitioning/local-inlining.rs
+++ b/src/test/codegen-units/partitioning/local-inlining.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining
 // compile-flags:-Zinline-in-all-cgus
 
 #![allow(dead_code)]
diff --git a/src/test/codegen-units/partitioning/local-transitive-inlining.rs b/src/test/codegen-units/partitioning/local-transitive-inlining.rs
index 5bc56146794..3cf03966865 100644
--- a/src/test/codegen-units/partitioning/local-transitive-inlining.rs
+++ b/src/test/codegen-units/partitioning/local-transitive-inlining.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-transitive-inlining
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-transitive-inlining
 // compile-flags:-Zinline-in-all-cgus
 
 #![allow(dead_code)]
diff --git a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs b/src/test/codegen-units/partitioning/methods-are-with-self-type.rs
index c2961ed9322..6c55904c1bf 100644
--- a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs
+++ b/src/test/codegen-units/partitioning/methods-are-with-self-type.rs
@@ -4,9 +4,9 @@
 // ignore-test
 
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/methods-are-with-self-type
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/methods-are-with-self-type
 
 #![allow(dead_code)]
 #![feature(start)]
diff --git a/src/test/codegen-units/partitioning/regular-modules.rs b/src/test/codegen-units/partitioning/regular-modules.rs
index f42dc3dfc17..c8ceeafd0bf 100644
--- a/src/test/codegen-units/partitioning/regular-modules.rs
+++ b/src/test/codegen-units/partitioning/regular-modules.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/regular-modules
+// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules
 
 #![allow(dead_code)]
 #![crate_type="lib"]
diff --git a/src/test/codegen-units/partitioning/shared-generics.rs b/src/test/codegen-units/partitioning/shared-generics.rs
index 47ff94437ff..99142dd6b7e 100644
--- a/src/test/codegen-units/partitioning/shared-generics.rs
+++ b/src/test/codegen-units/partitioning/shared-generics.rs
@@ -2,7 +2,7 @@
 // no-prefer-dynamic
 // NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
 //       prevent drop-glue from participating in share-generics.
-// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Zincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0
+// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Cincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0
 
 #![crate_type="rlib"]
 
diff --git a/src/test/codegen-units/partitioning/statics.rs b/src/test/codegen-units/partitioning/statics.rs
index bbded480b0c..5eac046b810 100644
--- a/src/test/codegen-units/partitioning/statics.rs
+++ b/src/test/codegen-units/partitioning/statics.rs
@@ -1,6 +1,6 @@
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/statics
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/statics
 
 #![crate_type="rlib"]
 
diff --git a/src/test/codegen-units/partitioning/vtable-through-const.rs b/src/test/codegen-units/partitioning/vtable-through-const.rs
index 06e2ef6bb22..5a1d95d2669 100644
--- a/src/test/codegen-units/partitioning/vtable-through-const.rs
+++ b/src/test/codegen-units/partitioning/vtable-through-const.rs
@@ -1,8 +1,8 @@
 // ignore-tidy-linelength
 
-// We specify -Z incremental here because we want to test the partitioning for
+// We specify -C incremental here because we want to test the partitioning for
 // incremental compilation
-// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/vtable-through-const
+// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/vtable-through-const
 // compile-flags:-Zinline-in-all-cgus
 
 // This test case makes sure, that references made through constants are
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index faefbb15790..4508f5b7f95 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2570,12 +2570,12 @@ impl<'test> TestCx<'test> {
         //   - if `cfail`, expect compilation to fail
         //   - if `rfail`, expect execution to fail
         // - create a directory build/foo/bar.incremental
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass1
+        // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C rpass1
         //   - because name of revision starts with "rpass", expect success
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C cfail2
+        // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C cfail2
         //   - because name of revision starts with "cfail", expect an error
         //   - load expected errors as usual, but filter for those that end in `[rfail2]`
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass3
+        // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C rpass3
         //   - because name of revision starts with "rpass", expect success
         // - execute build/foo/bar.exe and save output
         //