@@ -718,7 +718,7 @@ impl Config {
718718        config. in_tree_llvm_info  = config. git_info ( false ,  & config. src . join ( "src/llvm-project" ) ) ; 
719719        config. in_tree_gcc_info  = config. git_info ( false ,  & config. src . join ( "src/gcc" ) ) ; 
720720
721-         toml. rust . as_ref ( ) . map ( |rust|  { 
721+         if   let   Some ( rust )  =  toml. rust . as_ref ( )  { 
722722            // FIXME(#133381): alt rustc builds currently do *not* have rustc debug assertions 
723723            // enabled. We should not download a CI alt rustc if we need rustc to have debug 
724724            // assertions (e.g. for crashes test suite). This can be changed once something like 
@@ -749,7 +749,7 @@ impl Config {
749749                debug_assertions_requested, 
750750                config. llvm_assertions , 
751751            ) ; 
752-         } ) ; 
752+         } ; 
753753
754754        if  !is_user_configured_rust_channel && config. rust_info . is_from_tarball ( )  { 
755755            config. channel  = ci_channel. into ( ) ; 
@@ -795,9 +795,14 @@ impl Config {
795795                . collect :: < Vec < PathBuf > > ( ) , 
796796        ) ; 
797797
798+         // Though we are applying it here, but the enzyme from llvm should get preference. 
799+         config. llvm_enzyme  =
800+             config. llvm_enzyme  || config. channel  == "dev"  || config. channel  == "nightly" ; 
801+ 
798802        config. apply_install_config ( toml. install ) ; 
799803        config. apply_gcc_config ( toml. gcc ) ; 
800804        config. apply_dist_config ( toml. dist ) ; 
805+         config. apply_llvm_config ( toml. llvm ) ; 
801806
802807        config. apply_build_config ( 
803808            toml. build , 
@@ -809,7 +814,6 @@ impl Config {
809814        ) ; 
810815        config. apply_target_config ( toml. target ) ; 
811816        config. apply_rust_config ( toml. rust ,  flags_warnings) ; 
812-         config. apply_llvm_config ( toml. llvm ) ; 
813817
814818        if  config. llvm_from_ci  { 
815819            let  triple = & config. host_target . triple ; 
0 commit comments