@@ -17,7 +17,6 @@ use std::{env, fs};
17
17
use build_helper:: ci:: CiEnv ;
18
18
use build_helper:: exit;
19
19
use build_helper:: git:: { GitConfig , PathFreshness , check_path_modifications, output_result} ;
20
- use serde:: Deserialize ;
21
20
#[ cfg( feature = "tracing" ) ]
22
21
use tracing:: { instrument, span} ;
23
22
@@ -26,13 +25,12 @@ use crate::core::build_steps::llvm::LLVM_INVALIDATION_PATHS;
26
25
use crate :: core:: config:: flags:: Color ;
27
26
pub use crate :: core:: config:: flags:: Subcommand ;
28
27
use crate :: core:: config:: parsing:: check_incompatible_options_for_ci_rustc;
29
- use crate :: core:: config:: toml:: change_id:: { ChangeId , ChangeIdWrapper } ;
28
+ use crate :: core:: config:: toml:: change_id:: ChangeId ;
30
29
use crate :: core:: config:: toml:: common:: {
31
30
DebuginfoLevel , LlvmLibunwind , SplitDebuginfo , StringOrBool ,
32
31
} ;
33
32
use crate :: core:: config:: toml:: rust:: { LldMode , RustOptimize } ;
34
33
use crate :: core:: config:: toml:: target:: Target ;
35
- use crate :: core:: config:: toml:: * ;
36
34
use crate :: core:: config:: types:: { DryRun , GccCiMode , RustcLto } ;
37
35
use crate :: core:: download:: is_download_ci_available;
38
36
use crate :: utils:: channel;
@@ -58,14 +56,6 @@ pub const RUSTC_IF_UNCHANGED_ALLOWED_PATHS: &[&str] = &[
58
56
":!triagebot.toml" ,
59
57
] ;
60
58
61
- /// This file is embedded in the overlay directory of the tarball sources. It is
62
- /// useful in scenarios where developers want to see how the tarball sources were
63
- /// generated.
64
- ///
65
- /// We also use this file to compare the host's bootstrap.toml against the CI rustc builder
66
- /// configuration to detect any incompatible options.
67
- pub const BUILDER_CONFIG_FILENAME : & str = "builder-config" ;
68
-
69
59
/// Global configuration for the entire build and/or bootstrap.
70
60
///
71
61
/// This structure is parsed from `bootstrap.toml`, and some of the fields are inferred from `git` or build-time parameters.
@@ -358,47 +348,6 @@ impl Config {
358
348
Self :: parse_inner ( flags, Self :: get_toml)
359
349
}
360
350
361
- pub ( crate ) fn get_builder_toml ( & self , build_name : & str ) -> Result < TomlConfig , toml:: de:: Error > {
362
- if self . dry_run ( ) {
363
- return Ok ( TomlConfig :: default ( ) ) ;
364
- }
365
-
366
- let builder_config_path =
367
- self . out . join ( self . build . triple ) . join ( build_name) . join ( BUILDER_CONFIG_FILENAME ) ;
368
- Self :: get_toml ( & builder_config_path)
369
- }
370
-
371
- pub ( crate ) fn get_toml ( file : & Path ) -> Result < TomlConfig , toml:: de:: Error > {
372
- #[ cfg( test) ]
373
- return Ok ( TomlConfig :: default ( ) ) ;
374
-
375
- #[ cfg( not( test) ) ]
376
- Self :: get_toml_inner ( file)
377
- }
378
-
379
- pub ( crate ) fn get_toml_inner ( file : & Path ) -> Result < TomlConfig , toml:: de:: Error > {
380
- let contents =
381
- t ! ( fs:: read_to_string( file) , format!( "config file {} not found" , file. display( ) ) ) ;
382
- // Deserialize to Value and then TomlConfig to prevent the Deserialize impl of
383
- // TomlConfig and sub types to be monomorphized 5x by toml.
384
- toml:: from_str ( & contents)
385
- . and_then ( |table : toml:: Value | TomlConfig :: deserialize ( table) )
386
- . inspect_err ( |_| {
387
- if let Ok ( ChangeIdWrapper { inner : Some ( ChangeId :: Id ( id) ) } ) =
388
- toml:: from_str :: < toml:: Value > ( & contents)
389
- . and_then ( |table : toml:: Value | ChangeIdWrapper :: deserialize ( table) )
390
- {
391
- let changes = crate :: find_recent_config_change_ids ( id) ;
392
- if !changes. is_empty ( ) {
393
- println ! (
394
- "WARNING: There have been changes to x.py since you last updated:\n {}" ,
395
- crate :: human_readable_changes( changes)
396
- ) ;
397
- }
398
- }
399
- } )
400
- }
401
-
402
351
pub fn dry_run ( & self ) -> bool {
403
352
match self . dry_run {
404
353
DryRun :: Disabled => false ,
0 commit comments