@@ -692,6 +692,7 @@ macro_rules! tool_extended {
692
692
stable = $stable: expr,
693
693
$( in_tree = $in_tree: expr, ) ?
694
694
$( submodule = $submodule: literal, ) ?
695
+ $( tool_std = $tool_std: literal, ) ?
695
696
$extra_deps: block; ) +) => {
696
697
$(
697
698
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
@@ -740,7 +741,7 @@ macro_rules! tool_extended {
740
741
compiler: $sel. compiler,
741
742
target: $sel. target,
742
743
tool: $tool_name,
743
- mode: Mode :: ToolRustc ,
744
+ mode: if false $ ( || $tool_std ) ? { Mode :: ToolStd } else { Mode :: ToolRustc } ,
744
745
path: $path,
745
746
extra_features: $sel. extra_features,
746
747
is_optional_tool: true ,
@@ -774,7 +775,10 @@ tool_extended!((self, builder),
774
775
} ) ;
775
776
self . extra_features. push( "clippy" . to_owned( ) ) ;
776
777
} ;
777
- RustDemangler , rust_demangler, "src/tools/rust-demangler" , "rust-demangler" , stable=false , in_tree=true , { } ;
778
+ // FIXME: tool_std is not quite right, we shouldn't allow nightly features.
779
+ // But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
780
+ // and this is close enough for now.
781
+ RustDemangler , rust_demangler, "src/tools/rust-demangler" , "rust-demangler" , stable=false , in_tree=true , tool_std=true , { } ;
778
782
Rustfmt , rustfmt, "src/tools/rustfmt" , "rustfmt" , stable=true , in_tree=true , { } ;
779
783
RustAnalyzer , rust_analyzer, "src/tools/rust-analyzer/crates/rust-analyzer" , "rust-analyzer" , stable=false , submodule="rust-analyzer" , { } ;
780
784
) ;
0 commit comments