@@ -533,7 +533,7 @@ impl Builder<'_> {
533
533
if cmd_kind == Kind :: Doc {
534
534
let my_out = match mode {
535
535
// This is the intended out directory for compiler documentation.
536
- Mode :: Rustc | Mode :: ToolRustc | Mode :: ToolBootstrap => {
536
+ Mode :: Rustc | Mode :: ToolRustcPrivate | Mode :: ToolBootstrap => {
537
537
self . compiler_doc_out ( target)
538
538
}
539
539
Mode :: Std => {
@@ -583,7 +583,7 @@ impl Builder<'_> {
583
583
584
584
// We synthetically interpret a stage0 compiler used to build tools as a
585
585
// "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.
587
587
let use_snapshot =
588
588
mode == Mode :: ToolBootstrap || ( mode == Mode :: ToolTarget && build_compiler_stage == 0 ) ;
589
589
assert ! ( !use_snapshot || build_compiler_stage == 0 || self . local_rebuild) ;
@@ -643,7 +643,8 @@ impl Builder<'_> {
643
643
// sysroot. Passing this cfg enables raw-dylib support instead, which makes the native
644
644
// library unnecessary. This can be removed when windows-rs enables raw-dylib
645
645
// 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
+ {
647
648
rustflags. arg ( "--cfg=windows_raw_dylib" ) ;
648
649
}
649
650
@@ -657,7 +658,7 @@ impl Builder<'_> {
657
658
// - rust-analyzer, due to the rowan crate
658
659
// so we exclude an entire category of steps here due to lack of fine-grained control over
659
660
// rustflags.
660
- if self . config . rust_randomize_layout && mode != Mode :: ToolRustc {
661
+ if self . config . rust_randomize_layout && mode != Mode :: ToolRustcPrivate {
661
662
rustflags. arg ( "-Zrandomize-layout" ) ;
662
663
}
663
664
@@ -717,7 +718,7 @@ impl Builder<'_> {
717
718
718
719
match mode {
719
720
Mode :: Std | Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolTarget => { }
720
- Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => {
721
+ Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustcPrivate => {
721
722
// Build proc macros both for the host and the target unless proc-macros are not
722
723
// supported by the target.
723
724
if target != compiler. host && cmd_kind != Kind :: Check {
@@ -778,7 +779,7 @@ impl Builder<'_> {
778
779
"binary-dep-depinfo,proc_macro_span,proc_macro_span_shrink,proc_macro_diagnostic"
779
780
. to_string ( )
780
781
}
781
- Mode :: Std | Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => String :: new ( ) ,
782
+ Mode :: Std | Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustcPrivate => String :: new ( ) ,
782
783
} ;
783
784
784
785
cargo. arg ( "-j" ) . arg ( self . jobs ( ) . to_string ( ) ) ;
@@ -825,7 +826,7 @@ impl Builder<'_> {
825
826
// rustc step and one that we just built. This isn't always a
826
827
// problem, somehow -- not really clear why -- but we know that this
827
828
// fixes things.
828
- Mode :: ToolRustc => metadata. push_str ( "tool-rustc" ) ,
829
+ Mode :: ToolRustcPrivate => metadata. push_str ( "tool-rustc" ) ,
829
830
// Same for codegen backends.
830
831
Mode :: Codegen => metadata. push_str ( "codegen" ) ,
831
832
_ => { }
@@ -917,7 +918,7 @@ impl Builder<'_> {
917
918
let debuginfo_level = match mode {
918
919
Mode :: Rustc | Mode :: Codegen => self . config . rust_debuginfo_level_rustc ,
919
920
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 => {
921
922
self . config . rust_debuginfo_level_tools
922
923
}
923
924
} ;
@@ -930,7 +931,7 @@ impl Builder<'_> {
930
931
match mode {
931
932
Mode :: Std => self . config . std_debug_assertions ,
932
933
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 => {
934
935
self . config . tools_debug_assertions
935
936
}
936
937
}
@@ -1005,7 +1006,7 @@ impl Builder<'_> {
1005
1006
}
1006
1007
Mode :: Std
1007
1008
| Mode :: ToolBootstrap
1008
- | Mode :: ToolRustc
1009
+ | Mode :: ToolRustcPrivate
1009
1010
| Mode :: ToolStd
1010
1011
| Mode :: ToolTarget => {
1011
1012
if let Some ( ref map_to) =
@@ -1078,7 +1079,7 @@ impl Builder<'_> {
1078
1079
// requirement, but the `-L` library path is not propagated across
1079
1080
// separate Cargo projects. We can add LLVM's library path to the
1080
1081
// rustc args as a workaround.
1081
- if ( mode == Mode :: ToolRustc || mode == Mode :: Codegen )
1082
+ if ( mode == Mode :: ToolRustcPrivate || mode == Mode :: Codegen )
1082
1083
&& let Some ( llvm_config) = self . llvm_config ( target)
1083
1084
{
1084
1085
let llvm_libdir =
0 commit comments