99//! ensure that they're always in place if needed.
1010
1111use std:: fs;
12- use std:: path:: { Path , PathBuf } ;
12+ use std:: path:: PathBuf ;
1313use std:: sync:: OnceLock ;
1414
15+ use super :: llvm:: HashStamp ;
1516use crate :: core:: builder:: { Builder , RunConfig , ShouldRun , Step } ;
1617use crate :: core:: config:: TargetSelection ;
1718use crate :: utils:: exec:: command;
1819use crate :: utils:: helpers:: { self , t} ;
1920use crate :: { generate_smart_stamp_hash, Kind } ;
2021
21- use super :: llvm:: HashStamp ;
22-
2322pub struct Meta {
2423 stamp : HashStamp ,
2524 out_dir : PathBuf ,
@@ -38,13 +37,13 @@ pub enum GccBuildStatus {
3837/// GCC, it's fine for us to not try to avoid doing so.
3938pub fn prebuilt_gcc_config ( builder : & Builder < ' _ > , target : TargetSelection ) -> GccBuildStatus {
4039 // If we have gcc submodule initialized already, sync it.
41- builder. update_existing_submodule ( & Path :: new ( "src" ) . join ( " gcc") ) ;
40+ builder. update_existing_submodule ( "src/ gcc" ) ;
4241
4342 // FIXME (GuillaumeGomez): To be done once gccjit has been built in the CI.
4443 // builder.config.maybe_download_ci_gcc();
4544
4645 // Initialize the gcc submodule if not initialized already.
47- builder. update_submodule ( & Path :: new ( "src" ) . join ( " gcc") ) ;
46+ builder. update_submodule ( "src/ gcc" ) ;
4847
4948 let root = "src/gcc" ;
5049 let out_dir = builder. gcc_out ( target) . join ( "build" ) ;
@@ -199,18 +198,17 @@ impl Step for Gcc {
199198 return true ;
200199 }
201200
202- builder. run (
203- command ( root. join ( "configure" ) )
204- . current_dir ( & out_dir)
205- . arg ( "--enable-host-shared" )
206- . arg ( "--enable-languages=jit" )
207- . arg ( "--enable-checking=release" )
208- . arg ( "--disable-bootstrap" )
209- . arg ( "--disable-multilib" )
210- . arg ( format ! ( "--prefix={}" , install_dir. display( ) ) ) ,
211- ) ;
212- builder. run ( command ( "make" ) . current_dir ( & out_dir) . arg ( format ! ( "-j{}" , builder. jobs( ) ) ) ) ;
213- builder. run ( command ( "make" ) . current_dir ( & out_dir) . arg ( "install" ) ) ;
201+ command ( root. join ( "configure" ) )
202+ . current_dir ( & out_dir)
203+ . arg ( "--enable-host-shared" )
204+ . arg ( "--enable-languages=jit" )
205+ . arg ( "--enable-checking=release" )
206+ . arg ( "--disable-bootstrap" )
207+ . arg ( "--disable-multilib" )
208+ . arg ( format ! ( "--prefix={}" , install_dir. display( ) ) )
209+ . run ( builder) ;
210+ command ( "make" ) . current_dir ( & out_dir) . arg ( format ! ( "-j{}" , builder. jobs( ) ) ) . run ( builder) ;
211+ command ( "make" ) . current_dir ( & out_dir) . arg ( "install" ) . run ( builder) ;
214212
215213 t ! ( builder. symlink_file(
216214 install_dir. join( "lib/libgccjit.so" ) ,
0 commit comments