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
66license.workspace = true
77repository.workspace = true
88
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+
915[dependencies ]
1016anyhow = " 1.0"
1117tracing = " 0.1"
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ fn main() -> Result<()> {
7878 . current_dir ( & base)
7979 . stderr ( std:: process:: Stdio :: inherit ( ) )
8080 . stdout ( std:: process:: Stdio :: inherit ( ) ) ;
81+ runner:: forward_features ( cmd) ;
8182 tracing:: debug!( "Running cargo command: {:?}" , cmd) ;
8283
8384 let output = cmd. output ( ) . expect ( "build output" ) ;
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ impl Runner {
154154 msg : "Invalid config file path" . into ( ) ,
155155 } ) ?,
156156 ) ;
157+ forward_features ( cmd) ;
157158 debug ! ( "Running cargo command: {:?}" , cmd) ;
158159
159160 let output = cmd
@@ -331,6 +332,18 @@ impl Runner {
331332 }
332333}
333334
335+ pub fn forward_features ( cmd : & mut Command ) {
336+ cmd. arg ( "--features" ) ;
337+ #[ cfg( feature = "use-compiled-tools" ) ]
338+ {
339+ cmd. arg ( "difftest/use-compiled-tools" ) ;
340+ }
341+ #[ cfg( feature = "use-installed-tools" ) ]
342+ {
343+ cmd. arg ( "difftest/use-installed-tools" ) ;
344+ }
345+ }
346+
334347#[ cfg( test) ]
335348mod tests {
336349 use super :: * ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ repository.workspace = true
88
99# See rustc_codegen_spirv/Cargo.toml for details on these features
1010[features ]
11- default = [" use-compiled-tools" ]
1211use-installed-tools = [
1312 " spirv-builder/use-installed-tools"
1413]
You can’t perform that action at this time.
0 commit comments