@@ -51,6 +51,7 @@ pub struct Flags {
51
51
pub host : Option < Vec < TargetSelection > > ,
52
52
pub target : Option < Vec < TargetSelection > > ,
53
53
pub config : Option < PathBuf > ,
54
+ pub build_dir : Option < PathBuf > ,
54
55
pub jobs : Option < u32 > ,
55
56
pub cmd : Subcommand ,
56
57
pub incremental : bool ,
@@ -174,6 +175,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
174
175
opts. optflagmulti ( "v" , "verbose" , "use verbose output (-vv for very verbose)" ) ;
175
176
opts. optflag ( "i" , "incremental" , "use incremental compilation" ) ;
176
177
opts. optopt ( "" , "config" , "TOML configuration file for build" , "FILE" ) ;
178
+ opts. optopt (
179
+ "" ,
180
+ "build-dir" ,
181
+ "Build directory, overrides `build.build-dir` in `config.toml`" ,
182
+ "DIR" ,
183
+ ) ;
177
184
opts. optopt ( "" , "build" , "build target of the stage0 compiler" , "BUILD" ) ;
178
185
opts. optmulti ( "" , "host" , "host targets to build" , "HOST" ) ;
179
186
opts. optmulti ( "" , "target" , "target targets to build" , "TARGET" ) ;
@@ -649,6 +656,7 @@ Arguments:
649
656
None
650
657
} ,
651
658
config : matches. opt_str ( "config" ) . map ( PathBuf :: from) ,
659
+ build_dir : matches. opt_str ( "build-dir" ) . map ( PathBuf :: from) ,
652
660
jobs : matches. opt_str ( "jobs" ) . map ( |j| j. parse ( ) . expect ( "`jobs` should be a number" ) ) ,
653
661
cmd,
654
662
incremental : matches. opt_present ( "incremental" ) ,
0 commit comments