@@ -1627,6 +1627,8 @@ impl Step for Extended {
16271627 "rust-analyzer-preview" . to_string ( )
16281628 } else if name == "clippy" {
16291629 "clippy-preview" . to_string ( )
1630+ } else if name == "rustfmt" {
1631+ "rustfmt-preview" . to_string ( )
16301632 } else if name == "miri" {
16311633 "miri-preview" . to_string ( )
16321634 } else if name == "rustc-codegen-cranelift" {
@@ -1646,7 +1648,7 @@ impl Step for Extended {
16461648 prepare ( "cargo" ) ;
16471649 prepare ( "rust-analysis" ) ;
16481650 prepare ( "rust-std" ) ;
1649- for tool in & [ "clippy" , "rust-analyzer" , "rust-docs" , "miri" ] {
1651+ for tool in & [ "clippy" , "rustfmt" , " rust-analyzer", "rust-docs" , "miri" ] {
16501652 if built_tools. contains ( tool) {
16511653 prepare ( tool) ;
16521654 }
@@ -1764,6 +1766,24 @@ impl Step for Extended {
17641766 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
17651767 . run ( builder) ;
17661768 }
1769+ if built_tools. contains ( "rustfmt" ) {
1770+ command ( & heat)
1771+ . current_dir ( & exe)
1772+ . arg ( "dir" )
1773+ . arg ( "rustfmt" )
1774+ . args ( heat_flags)
1775+ . arg ( "-cg" )
1776+ . arg ( "RustFmtGroup" )
1777+ . arg ( "-dr" )
1778+ . arg ( "RustFmt" )
1779+ . arg ( "-var" )
1780+ . arg ( "var.RustFmtDir" )
1781+ . arg ( "-out" )
1782+ . arg ( exe. join ( "RustFmtGroup.wxs" ) )
1783+ . arg ( "-t" )
1784+ . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
1785+ . run ( builder) ;
1786+ }
17671787 if built_tools. contains ( "miri" ) {
17681788 command ( & heat)
17691789 . current_dir ( & exe)
@@ -1835,6 +1855,9 @@ impl Step for Extended {
18351855 if built_tools. contains ( "clippy" ) {
18361856 cmd. arg ( "-dClippyDir=clippy" ) ;
18371857 }
1858+ if built_tools. contains ( "rustfmt" ) {
1859+ cmd. arg ( "-dRustFmtDir=rustfmt" ) ;
1860+ }
18381861 if built_tools. contains ( "rust-docs" ) {
18391862 cmd. arg ( "-dDocsDir=rust-docs" ) ;
18401863 }
@@ -1861,6 +1884,9 @@ impl Step for Extended {
18611884 if built_tools. contains ( "clippy" ) {
18621885 candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
18631886 }
1887+ if built_tools. contains ( "rustfmt" ) {
1888+ candle ( "RustFmtGroup.wxs" . as_ref ( ) ) ;
1889+ }
18641890 if built_tools. contains ( "miri" ) {
18651891 candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
18661892 }
@@ -1899,6 +1925,9 @@ impl Step for Extended {
18991925 if built_tools. contains ( "clippy" ) {
19001926 cmd. arg ( "ClippyGroup.wixobj" ) ;
19011927 }
1928+ if built_tools. contains ( "rustfmt" ) {
1929+ cmd. arg ( "RustFmtGroup.wixobj" ) ;
1930+ }
19021931 if built_tools. contains ( "miri" ) {
19031932 cmd. arg ( "MiriGroup.wixobj" ) ;
19041933 }
0 commit comments