diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2023-04-21 15:33:04 +0200 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2023-04-28 08:47:55 -0700 |
| commit | a7bb8c78517102e375d4d04e5b2cac4f121c56e5 (patch) | |
| tree | fc36d3dfa885acdeb87d188dca16143ef538db3e /src/tools/compiletest | |
| parent | d64f46a553e5a1583680919807884794c93e63e8 (diff) | |
handle cfg(bootstrap)
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/common.rs | 37 | ||||
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 5 |
2 files changed, 5 insertions, 37 deletions
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 7166d99d792..9059a145b43 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -422,19 +422,11 @@ pub struct TargetCfgs { impl TargetCfgs { fn new(config: &Config) -> TargetCfgs { - let targets: HashMap<String, TargetCfg> = if config.stage_id.starts_with("stage0-") - || (config.suite == "ui-fulldeps" && config.stage_id.starts_with("stage1-")) - { - // #[cfg(bootstrap)] - // Needed only for one cycle, remove during the bootstrap bump. - Self::collect_all_slow(config) - } else { - serde_json::from_str(&rustc_output( - config, - &["--print=all-target-specs-json", "-Zunstable-options"], - )) - .unwrap() - }; + let targets: HashMap<String, TargetCfg> = serde_json::from_str(&rustc_output( + config, + &["--print=all-target-specs-json", "-Zunstable-options"], + )) + .unwrap(); let mut current = None; let mut all_targets = HashSet::new(); @@ -475,25 +467,6 @@ impl TargetCfgs { all_pointer_widths, } } - - // #[cfg(bootstrap)] - // Needed only for one cycle, remove during the bootstrap bump. - fn collect_all_slow(config: &Config) -> HashMap<String, TargetCfg> { - let mut result = HashMap::new(); - for target in rustc_output(config, &["--print=target-list"]).trim().lines() { - let json = rustc_output( - config, - &["--print=target-spec-json", "-Zunstable-options", "--target", target], - ); - match serde_json::from_str(&json) { - Ok(res) => { - result.insert(target.into(), res); - } - Err(err) => panic!("failed to parse target spec for {target}: {err}"), - } - } - result - } } #[derive(Clone, Debug, serde::Deserialize)] diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index ccce62bd5b0..01da5981015 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -943,15 +943,10 @@ pub fn make_test_description<R: Read>( name, ignore, ignore_message, - #[cfg(not(bootstrap))] source_file: "", - #[cfg(not(bootstrap))] start_line: 0, - #[cfg(not(bootstrap))] start_col: 0, - #[cfg(not(bootstrap))] end_line: 0, - #[cfg(not(bootstrap))] end_col: 0, should_panic, compile_fail: false, |
