@@ -30,7 +30,8 @@ use crate::core::config::flags::{Color, Flags, Warnings};
30
30
use crate :: core:: download:: is_download_ci_available;
31
31
use crate :: utils:: cache:: { INTERNER , Interned } ;
32
32
use 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} ;
34
35
35
36
/// Each path in this list is considered "allowed" in the `download-rustc="if-unchanged"` logic.
36
37
/// This means they can be modified and changes to these paths should never trigger a compiler build
@@ -422,6 +423,8 @@ pub struct Config {
422
423
423
424
/// Cache for determining path modifications
424
425
pub path_modification_cache : Arc < Mutex < HashMap < Vec < & ' static str > , PathFreshness > > > ,
426
+
427
+ pub execution_context : ExecutionContext ,
425
428
}
426
429
427
430
#[ derive( Debug , Default , Clone , Copy , PartialEq , Eq ) ]
@@ -1449,8 +1452,9 @@ impl Config {
1449
1452
feature = "tracing" ,
1450
1453
instrument( target = "CONFIG_HANDLING" , level = "trace" , name = "Config::parse" , skip_all)
1451
1454
) ]
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
1454
1458
}
1455
1459
1456
1460
#[ cfg_attr(
@@ -1465,8 +1469,10 @@ impl Config {
1465
1469
pub ( crate ) fn parse_inner (
1466
1470
mut flags : Flags ,
1467
1471
get_toml : impl Fn ( & Path ) -> Result < TomlConfig , toml:: de:: Error > ,
1472
+ execution_context : ExecutionContext ,
1468
1473
) -> Config {
1469
1474
let mut config = Config :: default_opts ( ) ;
1475
+ config. execution_context = execution_context;
1470
1476
1471
1477
// Set flags.
1472
1478
config. paths = std:: mem:: take ( & mut flags. paths ) ;
0 commit comments