File tree Expand file tree Collapse file tree 5 files changed +30
-650
lines changed Expand file tree Collapse file tree 5 files changed +30
-650
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ edition.workspace = true
6
6
license.workspace = true
7
7
repository.workspace = true
8
8
9
+ # See rustc_codegen_spirv/Cargo.toml for details on these features
10
+ [features ]
11
+ default = [" use-compiled-tools" ]
12
+ use-installed-tools = []
13
+ use-compiled-tools = []
14
+
9
15
[dependencies ]
10
16
anyhow = " 1.0"
11
17
tracing = " 0.1"
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ fn main() -> Result<()> {
78
78
. current_dir ( & base)
79
79
. stderr ( std:: process:: Stdio :: inherit ( ) )
80
80
. stdout ( std:: process:: Stdio :: inherit ( ) ) ;
81
+ runner:: forward_features ( cmd) ;
81
82
tracing:: debug!( "Running cargo command: {:?}" , cmd) ;
82
83
83
84
let output = cmd. output ( ) . expect ( "build output" ) ;
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ impl Runner {
154
154
msg : "Invalid config file path" . into ( ) ,
155
155
} ) ?,
156
156
) ;
157
+ forward_features ( cmd) ;
157
158
debug ! ( "Running cargo command: {:?}" , cmd) ;
158
159
159
160
let output = cmd
@@ -331,6 +332,18 @@ impl Runner {
331
332
}
332
333
}
333
334
335
+ pub fn forward_features ( cmd : & mut Command ) {
336
+ cmd. arg ( "--no-default-features" ) . arg ( "--features" ) ;
337
+ #[ cfg( feature = "use-compiled-tools" ) ]
338
+ {
339
+ cmd. arg ( "use-compiled-tools" ) ;
340
+ }
341
+ #[ cfg( feature = "use-installed-tools" ) ]
342
+ {
343
+ cmd. arg ( "use-installed-tools" ) ;
344
+ }
345
+ }
346
+
334
347
#[ cfg( test) ]
335
348
mod tests {
336
349
use super :: * ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ repository.workspace = true
8
8
9
9
# See rustc_codegen_spirv/Cargo.toml for details on these features
10
10
[features ]
11
- default = [" use-compiled-tools" ]
12
11
use-installed-tools = [
13
12
" spirv-builder/use-installed-tools"
14
13
]
You can’t perform that action at this time.
0 commit comments