@@ -111,11 +111,13 @@ enum EnvironmentCmd {
111111 } ,
112112}
113113
114- fn is_try_build ( ) -> bool {
114+ /// Are we supposed to only build the bare minimum of components to get a working toolchain?
115+ fn is_fast_try_build ( ) -> bool {
115116 std:: env:: var ( "DIST_TRY_BUILD" ) . unwrap_or_else ( |_| "0" . to_string ( ) ) != "0"
116117}
117118
118119fn create_environment ( args : Args ) -> anyhow:: Result < ( Environment , Vec < String > ) > {
120+ let is_fast_try_build = is_fast_try_build ( ) ;
119121 let ( env, args) = match args. env {
120122 EnvironmentCmd :: Local {
121123 target_triple,
@@ -144,6 +146,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
144146 . skipped_tests ( skipped_tests)
145147 . benchmark_cargo_config ( benchmark_cargo_config)
146148 . run_tests ( run_tests)
149+ . fast_try_build ( is_fast_try_build)
147150 . build ( ) ?;
148151
149152 ( env, shared. build_args )
@@ -167,6 +170,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
167170 . use_bolt ( !is_aarch64)
168171 . skipped_tests ( vec ! [ ] )
169172 . run_tests ( true )
173+ . fast_try_build ( is_fast_try_build)
170174 . build ( ) ?;
171175
172176 ( env, shared. build_args )
@@ -187,6 +191,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
187191 . use_bolt ( false )
188192 . skipped_tests ( vec ! [ ] )
189193 . run_tests ( true )
194+ . fast_try_build ( is_fast_try_build)
190195 . build ( ) ?;
191196
192197 ( env, shared. build_args )
@@ -352,7 +357,7 @@ fn execute_pipeline(
352357 // possible regressions.
353358 // The tests are not executed for try builds, which can be in various broken states, so we don't
354359 // want to gatekeep them with tests.
355- if !is_try_build ( ) && env. run_tests ( ) {
360+ if !is_fast_try_build ( ) && env. run_tests ( ) {
356361 timer. section ( "Run tests" , |_| run_tests ( env) ) ?;
357362 }
358363
@@ -397,7 +402,7 @@ fn main() -> anyhow::Result<()> {
397402 let ( env, mut build_args) = create_environment ( args) . context ( "Cannot create environment" ) ?;
398403
399404 // Skip components that are not needed for try builds to speed them up
400- if is_try_build ( ) {
405+ if is_fast_try_build ( ) {
401406 log:: info!( "Skipping building of unimportant components for a try build" ) ;
402407 for target in [
403408 "rust-docs" ,
0 commit comments