@@ -1633,6 +1633,8 @@ impl Step for Extended {
16331633 "rust-analyzer-preview" . to_string ( )
16341634 } else if name == "clippy" {
16351635 "clippy-preview" . to_string ( )
1636+ } else if name == "rustfmt" {
1637+ "rustfmt-preview" . to_string ( )
16361638 } else if name == "miri" {
16371639 "miri-preview" . to_string ( )
16381640 } else if name == "rustc-codegen-cranelift" {
@@ -1652,7 +1654,7 @@ impl Step for Extended {
16521654 prepare ( "cargo" ) ;
16531655 prepare ( "rust-analysis" ) ;
16541656 prepare ( "rust-std" ) ;
1655- for tool in & [ "clippy" , "rust-analyzer" , "rust-docs" , "miri" ] {
1657+ for tool in & [ "clippy" , "rustfmt" , " rust-analyzer", "rust-docs" , "miri" ] {
16561658 if built_tools. contains ( tool) {
16571659 prepare ( tool) ;
16581660 }
@@ -1770,6 +1772,24 @@ impl Step for Extended {
17701772 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
17711773 . run ( builder) ;
17721774 }
1775+ if built_tools. contains ( "rustfmt" ) {
1776+ command ( & heat)
1777+ . current_dir ( & exe)
1778+ . arg ( "dir" )
1779+ . arg ( "rustfmt" )
1780+ . args ( heat_flags)
1781+ . arg ( "-cg" )
1782+ . arg ( "RustFmtGroup" )
1783+ . arg ( "-dr" )
1784+ . arg ( "RustFmt" )
1785+ . arg ( "-var" )
1786+ . arg ( "var.RustFmtDir" )
1787+ . arg ( "-out" )
1788+ . arg ( exe. join ( "RustFmtGroup.wxs" ) )
1789+ . arg ( "-t" )
1790+ . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
1791+ . run ( builder) ;
1792+ }
17731793 if built_tools. contains ( "miri" ) {
17741794 command ( & heat)
17751795 . current_dir ( & exe)
@@ -1841,6 +1861,9 @@ impl Step for Extended {
18411861 if built_tools. contains ( "clippy" ) {
18421862 cmd. arg ( "-dClippyDir=clippy" ) ;
18431863 }
1864+ if built_tools. contains ( "rustfmt" ) {
1865+ cmd. arg ( "-dRustFmtDir=rustfmt" ) ;
1866+ }
18441867 if built_tools. contains ( "rust-docs" ) {
18451868 cmd. arg ( "-dDocsDir=rust-docs" ) ;
18461869 }
@@ -1867,6 +1890,9 @@ impl Step for Extended {
18671890 if built_tools. contains ( "clippy" ) {
18681891 candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
18691892 }
1893+ if built_tools. contains ( "rustfmt" ) {
1894+ candle ( "RustFmtGroup.wxs" . as_ref ( ) ) ;
1895+ }
18701896 if built_tools. contains ( "miri" ) {
18711897 candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
18721898 }
@@ -1905,6 +1931,9 @@ impl Step for Extended {
19051931 if built_tools. contains ( "clippy" ) {
19061932 cmd. arg ( "ClippyGroup.wixobj" ) ;
19071933 }
1934+ if built_tools. contains ( "rustfmt" ) {
1935+ cmd. arg ( "RustFmtGroup.wixobj" ) ;
1936+ }
19081937 if built_tools. contains ( "miri" ) {
19091938 cmd. arg ( "MiriGroup.wixobj" ) ;
19101939 }
0 commit comments