@@ -534,7 +534,6 @@ bootstrap_tool!(
534534 // rustdoc-gui-test has a crate dependency on compiletest, so it needs the same unstable features.
535535 RustdocGUITest , "src/tools/rustdoc-gui-test" , "rustdoc-gui-test" , is_unstable_tool = true , allow_features = COMPILETEST_ALLOW_FEATURES ;
536536 CoverageDump , "src/tools/coverage-dump" , "coverage-dump" ;
537- WasmComponentLd , "src/tools/wasm-component-ld" , "wasm-component-ld" , is_unstable_tool = true , allow_features = "min_specialization" ;
538537 UnicodeTableGenerator , "src/tools/unicode-table-generator" , "unicode-table-generator" ;
539538 FeaturesStatusDump , "src/tools/features-status-dump" , "features-status-dump" ;
540539 OptimizedDist , "src/tools/opt-dist" , "opt-dist" , submodules = & [ "src/tools/rustc-perf" ] ;
@@ -929,6 +928,63 @@ impl Step for LldWrapper {
929928 }
930929}
931930
931+ #[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
932+ pub struct WasmComponentLd {
933+ build_compiler : Compiler ,
934+ target : TargetSelection ,
935+ }
936+
937+ impl WasmComponentLd {
938+ pub fn for_target ( builder : & Builder < ' _ > , target : TargetSelection ) -> Self {
939+ Self { build_compiler : get_tool_target_compiler ( builder, target) , target }
940+ }
941+ }
942+
943+ impl Step for WasmComponentLd {
944+ type Output = ToolBuildResult ;
945+
946+ const ONLY_HOSTS : bool = true ;
947+
948+ fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
949+ run. path ( "src/tools/wasm-component-ld" )
950+ }
951+
952+ fn make_run ( run : RunConfig < ' _ > ) {
953+ run. builder . ensure ( WasmComponentLd {
954+ build_compiler : get_tool_target_compiler ( run. builder , run. target ) ,
955+ target : run. target ,
956+ } ) ;
957+ }
958+
959+ #[ cfg_attr(
960+ feature = "tracing" ,
961+ instrument(
962+ level = "debug" ,
963+ name = "WasmComponentLd::run" ,
964+ skip_all,
965+ fields( build_compiler = ?self . build_compiler) ,
966+ ) ,
967+ ) ]
968+ fn run ( self , builder : & Builder < ' _ > ) -> ToolBuildResult {
969+ builder. ensure ( ToolBuild {
970+ build_compiler : self . build_compiler ,
971+ target : self . target ,
972+ tool : "wasm-component-ld" ,
973+ mode : Mode :: ToolTarget ,
974+ path : "src/tools/wasm-component-ld" ,
975+ source_type : SourceType :: InTree ,
976+ extra_features : vec ! [ ] ,
977+ allow_features : "min-specialization" ,
978+ cargo_args : vec ! [ ] ,
979+ artifact_kind : ToolArtifactKind :: Binary ,
980+ } )
981+ }
982+
983+ fn metadata ( & self ) -> Option < StepMetadata > {
984+ Some ( StepMetadata :: build ( "WasmComponentLd" , self . target ) . built_by ( self . build_compiler ) )
985+ }
986+ }
987+
932988#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
933989pub struct RustAnalyzer {
934990 pub compiler : Compiler ,
0 commit comments