@@ -2390,47 +2390,47 @@ impl Config {
23902390 }
23912391 }
23922392
2393- #[ cfg( feature = "bootstrap-self-test" ) ]
2393+ // #[cfg(feature = "bootstrap-self-test")]
23942394 pub fn check_stage0_version ( & self , _program_path : & Path , _component_name : & ' static str ) { }
23952395
2396- /// check rustc/cargo version is same or lower with 1 apart from the building one
2397- #[ cfg( not( feature = "bootstrap-self-test" ) ) ]
2398- pub fn check_stage0_version ( & self , program_path : & Path , component_name : & ' static str ) {
2399- use build_helper:: util:: fail;
2400-
2401- if self . dry_run ( ) {
2402- return ;
2403- }
2404-
2405- let stage0_output = output ( Command :: new ( program_path) . arg ( "--version" ) ) ;
2406- let mut stage0_output = stage0_output. lines ( ) . next ( ) . unwrap ( ) . split ( ' ' ) ;
2407-
2408- let stage0_name = stage0_output. next ( ) . unwrap ( ) ;
2409- if stage0_name != component_name {
2410- fail ( & format ! (
2411- "Expected to find {component_name} at {} but it claims to be {stage0_name}" ,
2412- program_path. display( )
2413- ) ) ;
2414- }
2415-
2416- let stage0_version =
2417- semver:: Version :: parse ( stage0_output. next ( ) . unwrap ( ) . split ( '-' ) . next ( ) . unwrap ( ) . trim ( ) )
2418- . unwrap ( ) ;
2419- let source_version = semver:: Version :: parse (
2420- fs:: read_to_string ( self . src . join ( "src/version" ) ) . unwrap ( ) . trim ( ) ,
2421- )
2422- . unwrap ( ) ;
2423- if !( source_version == stage0_version
2424- || ( source_version. major == stage0_version. major
2425- && ( source_version. minor == stage0_version. minor
2426- || source_version. minor == stage0_version. minor + 1 ) ) )
2427- {
2428- let prev_version = format ! ( "{}.{}.x" , source_version. major, source_version. minor - 1 ) ;
2429- fail ( & format ! (
2430- "Unexpected {component_name} version: {stage0_version}, we should use {prev_version}/{source_version} to build source with {source_version}"
2431- ) ) ;
2432- }
2433- }
2396+ // // / check rustc/cargo version is same or lower with 1 apart from the building one
2397+ // #[cfg(not(feature = "bootstrap-self-test"))]
2398+ // pub fn check_stage0_version(&self, program_path: &Path, component_name: &'static str) {
2399+ // use build_helper::util::fail;
2400+
2401+ // if self.dry_run() {
2402+ // return;
2403+ // }
2404+
2405+ // let stage0_output = output(Command::new(program_path).arg("--version"));
2406+ // let mut stage0_output = stage0_output.lines().next().unwrap().split(' ');
2407+
2408+ // let stage0_name = stage0_output.next().unwrap();
2409+ // if stage0_name != component_name {
2410+ // fail(&format!(
2411+ // "Expected to find {component_name} at {} but it claims to be {stage0_name}",
2412+ // program_path.display()
2413+ // ));
2414+ // }
2415+
2416+ // let stage0_version =
2417+ // semver::Version::parse(stage0_output.next().unwrap().split('-').next().unwrap().trim())
2418+ // .unwrap();
2419+ // let source_version = semver::Version::parse(
2420+ // fs::read_to_string(self.src.join("src/version")).unwrap().trim(),
2421+ // )
2422+ // .unwrap();
2423+ // if !(source_version == stage0_version
2424+ // || (source_version.major == stage0_version.major
2425+ // && (source_version.minor == stage0_version.minor
2426+ // || source_version.minor == stage0_version.minor + 1)))
2427+ // {
2428+ // let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1);
2429+ // fail(&format!(
2430+ // "Unexpected {component_name} version: {stage0_version}, we should use {prev_version}/{source_version} to build source with {source_version}"
2431+ // ));
2432+ // }
2433+ // }
24342434
24352435 /// Returns the commit to download, or `None` if we shouldn't download CI artifacts.
24362436 fn download_ci_rustc_commit ( & self , download_rustc : Option < StringOrBool > ) -> Option < String > {
0 commit comments