@@ -1459,62 +1459,6 @@ impl Step for Rustfmt {
14591459 }
14601460}
14611461
1462- #[ derive( Debug , PartialOrd , Ord , Clone , Hash , PartialEq , Eq ) ]
1463- pub struct RustDemangler {
1464- pub compiler : Compiler ,
1465- pub target : TargetSelection ,
1466- }
1467-
1468- impl Step for RustDemangler {
1469- type Output = Option < GeneratedTarball > ;
1470- const DEFAULT : bool = true ;
1471- const ONLY_HOSTS : bool = true ;
1472-
1473- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
1474- // While other tools use `should_build_extended_tool` to decide whether to be run by
1475- // default or not, `rust-demangler` must be build when *either* it's enabled as a tool like
1476- // the other ones or if `profiler = true`. Because we don't know the target at this stage
1477- // we run the step by default when only `extended = true`, and decide whether to actually
1478- // run it or not later.
1479- let default = run. builder . config . extended ;
1480- run. alias ( "rust-demangler" ) . default_condition ( default)
1481- }
1482-
1483- fn make_run ( run : RunConfig < ' _ > ) {
1484- run. builder . ensure ( RustDemangler {
1485- compiler : run. builder . compiler_for (
1486- run. builder . top_stage ,
1487- run. builder . config . build ,
1488- run. target ,
1489- ) ,
1490- target : run. target ,
1491- } ) ;
1492- }
1493-
1494- fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
1495- let compiler = self . compiler ;
1496- let target = self . target ;
1497-
1498- // Only build this extended tool if explicitly included in `tools`, or if `profiler = true`
1499- let condition = should_build_extended_tool ( builder, "rust-demangler" )
1500- || builder. config . profiler_enabled ( target) ;
1501- if builder. config . extended && !condition {
1502- return None ;
1503- }
1504-
1505- let rust_demangler =
1506- builder. ensure ( tool:: RustDemangler { compiler, target, extra_features : Vec :: new ( ) } ) ;
1507-
1508- // Prepare the image directory
1509- let mut tarball = Tarball :: new ( builder, "rust-demangler" , & target. triple ) ;
1510- tarball. set_overlay ( OverlayKind :: RustDemangler ) ;
1511- tarball. is_preview ( true ) ;
1512- tarball. add_file ( rust_demangler, "bin" , 0o755 ) ;
1513- tarball. add_legal_and_readme_to ( "share/doc/rust-demangler" ) ;
1514- Some ( tarball. generate ( ) )
1515- }
1516- }
1517-
15181462#[ derive( Debug , PartialOrd , Ord , Clone , Hash , PartialEq , Eq ) ]
15191463pub struct Extended {
15201464 stage : u32 ,
@@ -1572,7 +1516,6 @@ impl Step for Extended {
15721516
15731517 add_component ! ( "rust-docs" => Docs { host: target } ) ;
15741518 add_component ! ( "rust-json-docs" => JsonDocs { host: target } ) ;
1575- add_component ! ( "rust-demangler" => RustDemangler { compiler, target } ) ;
15761519 add_component ! ( "cargo" => Cargo { compiler, target } ) ;
15771520 add_component ! ( "rustfmt" => Rustfmt { compiler, target } ) ;
15781521 add_component ! ( "rls" => Rls { compiler, target } ) ;
@@ -1636,7 +1579,7 @@ impl Step for Extended {
16361579
16371580 let xform = |p : & Path | {
16381581 let mut contents = t ! ( fs:: read_to_string( p) ) ;
1639- for tool in & [ "rust-demangler" , " miri", "rust-docs" ] {
1582+ for tool in & [ "miri" , "rust-docs" ] {
16401583 if !built_tools. contains ( tool) {
16411584 contents = filter ( & contents, tool) ;
16421585 }
@@ -1677,7 +1620,7 @@ impl Step for Extended {
16771620 prepare ( "rust-analysis" ) ;
16781621 prepare ( "clippy" ) ;
16791622 prepare ( "rust-analyzer" ) ;
1680- for tool in & [ "rust-docs" , "rust-demangler" , " miri", "rustc-codegen-cranelift" ] {
1623+ for tool in & [ "rust-docs" , "miri" , "rustc-codegen-cranelift" ] {
16811624 if built_tools. contains ( tool) {
16821625 prepare ( tool) ;
16831626 }
@@ -1717,8 +1660,6 @@ impl Step for Extended {
17171660 "rust-analyzer-preview" . to_string ( )
17181661 } else if name == "clippy" {
17191662 "clippy-preview" . to_string ( )
1720- } else if name == "rust-demangler" {
1721- "rust-demangler-preview" . to_string ( )
17221663 } else if name == "miri" {
17231664 "miri-preview" . to_string ( )
17241665 } else if name == "rustc-codegen-cranelift" {
@@ -1738,7 +1679,7 @@ impl Step for Extended {
17381679 prepare ( "cargo" ) ;
17391680 prepare ( "rust-analysis" ) ;
17401681 prepare ( "rust-std" ) ;
1741- for tool in & [ "clippy" , "rust-analyzer" , "rust-docs" , "rust-demangler" , " miri"] {
1682+ for tool in & [ "clippy" , "rust-analyzer" , "rust-docs" , "miri" ] {
17421683 if built_tools. contains ( tool) {
17431684 prepare ( tool) ;
17441685 }
@@ -1862,25 +1803,6 @@ impl Step for Extended {
18621803 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
18631804 ) ;
18641805 }
1865- if built_tools. contains ( "rust-demangler" ) {
1866- builder. run (
1867- Command :: new ( & heat)
1868- . current_dir ( & exe)
1869- . arg ( "dir" )
1870- . arg ( "rust-demangler" )
1871- . args ( heat_flags)
1872- . arg ( "-cg" )
1873- . arg ( "RustDemanglerGroup" )
1874- . arg ( "-dr" )
1875- . arg ( "RustDemangler" )
1876- . arg ( "-var" )
1877- . arg ( "var.RustDemanglerDir" )
1878- . arg ( "-out" )
1879- . arg ( exe. join ( "RustDemanglerGroup.wxs" ) )
1880- . arg ( "-t" )
1881- . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1882- ) ;
1883- }
18841806 if built_tools. contains ( "miri" ) {
18851807 builder. run (
18861808 Command :: new ( & heat)
@@ -1958,9 +1880,6 @@ impl Step for Extended {
19581880 if built_tools. contains ( "rust-docs" ) {
19591881 cmd. arg ( "-dDocsDir=rust-docs" ) ;
19601882 }
1961- if built_tools. contains ( "rust-demangler" ) {
1962- cmd. arg ( "-dRustDemanglerDir=rust-demangler" ) ;
1963- }
19641883 if built_tools. contains ( "rust-analyzer" ) {
19651884 cmd. arg ( "-dRustAnalyzerDir=rust-analyzer" ) ;
19661885 }
@@ -1987,9 +1906,6 @@ impl Step for Extended {
19871906 if built_tools. contains ( "miri" ) {
19881907 candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
19891908 }
1990- if built_tools. contains ( "rust-demangler" ) {
1991- candle ( "RustDemanglerGroup.wxs" . as_ref ( ) ) ;
1992- }
19931909 if built_tools. contains ( "rust-analyzer" ) {
19941910 candle ( "RustAnalyzerGroup.wxs" . as_ref ( ) ) ;
19951911 }
@@ -2031,9 +1947,6 @@ impl Step for Extended {
20311947 if built_tools. contains ( "rust-analyzer" ) {
20321948 cmd. arg ( "RustAnalyzerGroup.wixobj" ) ;
20331949 }
2034- if built_tools. contains ( "rust-demangler" ) {
2035- cmd. arg ( "RustDemanglerGroup.wixobj" ) ;
2036- }
20371950 if built_tools. contains ( "rust-docs" ) {
20381951 cmd. arg ( "DocsGroup.wixobj" ) ;
20391952 }
0 commit comments