Rename --always-cranelift to --cranelift.

Also, enable use of Lightbeam in wasm2obj.
This commit is contained in:
Dan Gohman
2019-10-04 17:02:31 -07:00
parent 36756613b8
commit 5ccdf13b11
7 changed files with 58 additions and 40 deletions

View File

@@ -7,14 +7,12 @@ pub fn pick_compilation_strategy(
// Decide how to compile.
match (always_lightbeam, always_cranelift) {
#[cfg(feature = "lightbeam")]
(true, false) => CompilationStrategy::AlwaysLightbeam,
(true, false) => CompilationStrategy::Lightbeam,
#[cfg(not(feature = "lightbeam"))]
(true, false) => panic!("--always-lightbeam given, but Lightbeam support is not enabled"),
(false, true) => CompilationStrategy::AlwaysCranelift,
(true, false) => panic!("--lightbeam given, but Lightbeam support is not enabled"),
(false, true) => CompilationStrategy::Cranelift,
(false, false) => CompilationStrategy::Auto,
(true, true) => {
panic!("Can't enable --always-cranelift and --always-lightbeam at the same time")
}
(true, true) => panic!("Can't enable --cranelift and --lightbeam at the same time"),
}
}