@@ -30,7 +30,8 @@ use crate::core::config::flags::{Color, Flags, Warnings};
3030use crate :: core:: download:: is_download_ci_available;
3131use crate :: utils:: cache:: { INTERNER , Interned } ;
3232use crate :: utils:: channel:: { self , GitInfo } ;
33- use crate :: utils:: helpers:: { self , exe, output, t} ;
33+ use crate :: utils:: execution_context:: ExecutionContext ;
34+ use crate :: utils:: helpers:: { self , exe, t} ;
3435
3536/// Each path in this list is considered "allowed" in the `download-rustc="if-unchanged"` logic.
3637/// This means they can be modified and changes to these paths should never trigger a compiler build
@@ -422,6 +423,8 @@ pub struct Config {
422423
423424 /// Cache for determining path modifications
424425 pub path_modification_cache : Arc < Mutex < HashMap < Vec < & ' static str > , PathFreshness > > > ,
426+
427+ pub execution_context : ExecutionContext ,
425428}
426429
427430#[ derive( Debug , Default , Clone , Copy , PartialEq , Eq ) ]
@@ -1449,8 +1452,9 @@ impl Config {
14491452 feature = "tracing" ,
14501453 instrument( target = "CONFIG_HANDLING" , level = "trace" , name = "Config::parse" , skip_all)
14511454 ) ]
1452- pub fn parse ( flags : Flags ) -> Config {
1453- Self :: parse_inner ( flags, Self :: get_toml)
1455+ pub fn parse ( flags : Flags , execution_context : ExecutionContext ) -> Config {
1456+ let config = Self :: parse_inner ( flags, Self :: get_toml, execution_context) ;
1457+ config
14541458 }
14551459
14561460 #[ cfg_attr(
@@ -1465,8 +1469,10 @@ impl Config {
14651469 pub ( crate ) fn parse_inner (
14661470 mut flags : Flags ,
14671471 get_toml : impl Fn ( & Path ) -> Result < TomlConfig , toml:: de:: Error > ,
1472+ execution_context : ExecutionContext ,
14681473 ) -> Config {
14691474 let mut config = Config :: default_opts ( ) ;
1475+ config. execution_context = execution_context;
14701476
14711477 // Set flags.
14721478 config. paths = std:: mem:: take ( & mut flags. paths ) ;
0 commit comments