9
9
//! ensure that they're always in place if needed.
10
10
11
11
use std:: fs;
12
- use std:: path:: { Path , PathBuf } ;
12
+ use std:: path:: PathBuf ;
13
13
use std:: sync:: OnceLock ;
14
14
15
+ use super :: llvm:: HashStamp ;
15
16
use crate :: core:: builder:: { Builder , RunConfig , ShouldRun , Step } ;
16
17
use crate :: core:: config:: TargetSelection ;
17
18
use crate :: utils:: exec:: command;
18
19
use crate :: utils:: helpers:: { self , t} ;
19
20
use crate :: { generate_smart_stamp_hash, Kind } ;
20
21
21
- use super :: llvm:: HashStamp ;
22
-
23
22
pub struct Meta {
24
23
stamp : HashStamp ,
25
24
out_dir : PathBuf ,
@@ -38,13 +37,13 @@ pub enum GccBuildStatus {
38
37
/// GCC, it's fine for us to not try to avoid doing so.
39
38
pub fn prebuilt_gcc_config ( builder : & Builder < ' _ > , target : TargetSelection ) -> GccBuildStatus {
40
39
// 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" ) ;
42
41
43
42
// FIXME (GuillaumeGomez): To be done once gccjit has been built in the CI.
44
43
// builder.config.maybe_download_ci_gcc();
45
44
46
45
// Initialize the gcc submodule if not initialized already.
47
- builder. update_submodule ( & Path :: new ( "src" ) . join ( " gcc") ) ;
46
+ builder. update_submodule ( "src/ gcc" ) ;
48
47
49
48
let root = "src/gcc" ;
50
49
let out_dir = builder. gcc_out ( target) . join ( "build" ) ;
@@ -199,18 +198,17 @@ impl Step for Gcc {
199
198
return true ;
200
199
}
201
200
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) ;
214
212
215
213
t ! ( builder. symlink_file(
216
214
install_dir. join( "lib/libgccjit.so" ) ,
0 commit comments