@@ -533,7 +533,7 @@ impl Builder<'_> {
533533 if cmd_kind == Kind :: Doc {
534534 let my_out = match mode {
535535 // This is the intended out directory for compiler documentation.
536- Mode :: Rustc | Mode :: ToolRustc | Mode :: ToolBootstrap => {
536+ Mode :: Rustc | Mode :: ToolRustcPrivate | Mode :: ToolBootstrap => {
537537 self . compiler_doc_out ( target)
538538 }
539539 Mode :: Std => {
@@ -583,7 +583,7 @@ impl Builder<'_> {
583583
584584 // We synthetically interpret a stage0 compiler used to build tools as a
585585 // "raw" compiler in that it's the exact snapshot we download. For things like
586- // ToolRustc , we would have to use the artificial stage0-sysroot compiler instead.
586+ // ToolRustcPrivate , we would have to use the artificial stage0-sysroot compiler instead.
587587 let use_snapshot =
588588 mode == Mode :: ToolBootstrap || ( mode == Mode :: ToolTarget && build_compiler_stage == 0 ) ;
589589 assert ! ( !use_snapshot || build_compiler_stage == 0 || self . local_rebuild) ;
@@ -643,7 +643,8 @@ impl Builder<'_> {
643643 // sysroot. Passing this cfg enables raw-dylib support instead, which makes the native
644644 // library unnecessary. This can be removed when windows-rs enables raw-dylib
645645 // unconditionally.
646- if let Mode :: Rustc | Mode :: ToolRustc | Mode :: ToolBootstrap | Mode :: ToolTarget = mode {
646+ if let Mode :: Rustc | Mode :: ToolRustcPrivate | Mode :: ToolBootstrap | Mode :: ToolTarget = mode
647+ {
647648 rustflags. arg ( "--cfg=windows_raw_dylib" ) ;
648649 }
649650
@@ -657,7 +658,7 @@ impl Builder<'_> {
657658 // - rust-analyzer, due to the rowan crate
658659 // so we exclude an entire category of steps here due to lack of fine-grained control over
659660 // rustflags.
660- if self . config . rust_randomize_layout && mode != Mode :: ToolRustc {
661+ if self . config . rust_randomize_layout && mode != Mode :: ToolRustcPrivate {
661662 rustflags. arg ( "-Zrandomize-layout" ) ;
662663 }
663664
@@ -717,7 +718,7 @@ impl Builder<'_> {
717718
718719 match mode {
719720 Mode :: Std | Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolTarget => { }
720- Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => {
721+ Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustcPrivate => {
721722 // Build proc macros both for the host and the target unless proc-macros are not
722723 // supported by the target.
723724 if target != compiler. host && cmd_kind != Kind :: Check {
@@ -778,7 +779,7 @@ impl Builder<'_> {
778779 "binary-dep-depinfo,proc_macro_span,proc_macro_span_shrink,proc_macro_diagnostic"
779780 . to_string ( )
780781 }
781- Mode :: Std | Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => String :: new ( ) ,
782+ Mode :: Std | Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustcPrivate => String :: new ( ) ,
782783 } ;
783784
784785 cargo. arg ( "-j" ) . arg ( self . jobs ( ) . to_string ( ) ) ;
@@ -825,7 +826,7 @@ impl Builder<'_> {
825826 // rustc step and one that we just built. This isn't always a
826827 // problem, somehow -- not really clear why -- but we know that this
827828 // fixes things.
828- Mode :: ToolRustc => metadata. push_str ( "tool-rustc" ) ,
829+ Mode :: ToolRustcPrivate => metadata. push_str ( "tool-rustc" ) ,
829830 // Same for codegen backends.
830831 Mode :: Codegen => metadata. push_str ( "codegen" ) ,
831832 _ => { }
@@ -917,7 +918,7 @@ impl Builder<'_> {
917918 let debuginfo_level = match mode {
918919 Mode :: Rustc | Mode :: Codegen => self . config . rust_debuginfo_level_rustc ,
919920 Mode :: Std => self . config . rust_debuginfo_level_std ,
920- Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustc | Mode :: ToolTarget => {
921+ Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustcPrivate | Mode :: ToolTarget => {
921922 self . config . rust_debuginfo_level_tools
922923 }
923924 } ;
@@ -930,7 +931,7 @@ impl Builder<'_> {
930931 match mode {
931932 Mode :: Std => self . config . std_debug_assertions ,
932933 Mode :: Rustc | Mode :: Codegen => self . config . rustc_debug_assertions ,
933- Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustc | Mode :: ToolTarget => {
934+ Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustcPrivate | Mode :: ToolTarget => {
934935 self . config . tools_debug_assertions
935936 }
936937 }
@@ -1005,7 +1006,7 @@ impl Builder<'_> {
10051006 }
10061007 Mode :: Std
10071008 | Mode :: ToolBootstrap
1008- | Mode :: ToolRustc
1009+ | Mode :: ToolRustcPrivate
10091010 | Mode :: ToolStd
10101011 | Mode :: ToolTarget => {
10111012 if let Some ( ref map_to) =
@@ -1078,7 +1079,7 @@ impl Builder<'_> {
10781079 // requirement, but the `-L` library path is not propagated across
10791080 // separate Cargo projects. We can add LLVM's library path to the
10801081 // rustc args as a workaround.
1081- if ( mode == Mode :: ToolRustc || mode == Mode :: Codegen )
1082+ if ( mode == Mode :: ToolRustcPrivate || mode == Mode :: Codegen )
10821083 && let Some ( llvm_config) = self . llvm_config ( target)
10831084 {
10841085 let llvm_libdir =
0 commit comments