Don't enable Lightbeam tests if Lightbeam isn't enabled.
This commit is contained in:
6
build.rs
6
build.rs
@@ -14,7 +14,11 @@ fn main() {
|
|||||||
let mut out = File::create(out_dir.join("wast_testsuite_tests.rs"))
|
let mut out = File::create(out_dir.join("wast_testsuite_tests.rs"))
|
||||||
.expect("error generating test source file");
|
.expect("error generating test source file");
|
||||||
|
|
||||||
for strategy in &["AlwaysCranelift", "AlwaysLightbeam"] {
|
for strategy in &[
|
||||||
|
"AlwaysCranelift",
|
||||||
|
#[cfg(feature = "lightbeam")]
|
||||||
|
"AlwaysLightbeam",
|
||||||
|
] {
|
||||||
writeln!(out, "#[allow(non_snake_case)]").expect("generating tests");
|
writeln!(out, "#[allow(non_snake_case)]").expect("generating tests");
|
||||||
writeln!(out, "mod {} {{", strategy).expect("generating tests");
|
writeln!(out, "mod {} {{", strategy).expect("generating tests");
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,10 @@ fn main() {
|
|||||||
|
|
||||||
// Decide how to compile.
|
// Decide how to compile.
|
||||||
let strategy = match (args.flag_always_lightbeam, args.flag_always_cranelift) {
|
let strategy = match (args.flag_always_lightbeam, args.flag_always_cranelift) {
|
||||||
|
#[cfg(feature = "lightbeam")]
|
||||||
(true, false) => CompilationStrategy::AlwaysLightbeam,
|
(true, false) => CompilationStrategy::AlwaysLightbeam,
|
||||||
|
#[cfg(not(feature = "lightbeam"))]
|
||||||
|
(true, false) => panic!("--always-lightbeam given, but Lightbeam support is not enabled"),
|
||||||
(false, true) => CompilationStrategy::AlwaysCranelift,
|
(false, true) => CompilationStrategy::AlwaysCranelift,
|
||||||
(false, false) => CompilationStrategy::Auto,
|
(false, false) => CompilationStrategy::Auto,
|
||||||
(true, true) => {
|
(true, true) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user