File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ pub struct BuildOpts {
86
86
/// Target to build for
87
87
#[ clap( long) ]
88
88
pub target : Option < String > ,
89
+ /// Directory for all generated artifacts
90
+ #[ clap( long) ]
91
+ pub target_dir : Option < String > ,
89
92
/// Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
90
93
#[ clap( short = 'Z' ) ]
91
94
pub unstable : Option < Vec < String > > ,
@@ -232,6 +235,11 @@ fn build(
232
235
// argument or in the cargo config file.
233
236
let mut args = vec ! [ "--target" . to_string( ) , target. to_string( ) ] ;
234
237
238
+ if let Some ( target_dir) = & build_options. target_dir {
239
+ args. push ( "--target-dir" . to_string ( ) ) ;
240
+ args. push ( target_dir. to_string ( ) ) ;
241
+ }
242
+
235
243
if build_options. release {
236
244
args. push ( "--release" . to_string ( ) ) ;
237
245
}
You can’t perform that action at this time.
0 commit comments