Rename "always_lightbeam" to "lightbeam" in more places. (#404)
This commit is contained in:
@@ -74,8 +74,8 @@ struct Args {
|
|||||||
flag_cache_config: Option<String>,
|
flag_cache_config: Option<String>,
|
||||||
flag_create_cache_config: bool,
|
flag_create_cache_config: bool,
|
||||||
flag_enable_simd: bool,
|
flag_enable_simd: bool,
|
||||||
flag_always_lightbeam: bool,
|
flag_lightbeam: bool,
|
||||||
flag_always_cranelift: bool,
|
flag_cranelift: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@@ -154,8 +154,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decide how to compile.
|
// Decide how to compile.
|
||||||
let strategy =
|
let strategy = pick_compilation_strategy(args.flag_cranelift, args.flag_lightbeam);
|
||||||
pick_compilation_strategy(args.flag_always_cranelift, args.flag_always_lightbeam);
|
|
||||||
|
|
||||||
let isa = isa_builder.finish(settings::Flags::new(flag_builder));
|
let isa = isa_builder.finish(settings::Flags::new(flag_builder));
|
||||||
let engine = Compiler::new(isa, strategy);
|
let engine = Compiler::new(isa, strategy);
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
use wasmtime_jit::CompilationStrategy;
|
use wasmtime_jit::CompilationStrategy;
|
||||||
|
|
||||||
pub fn pick_compilation_strategy(
|
pub fn pick_compilation_strategy(cranelift: bool, lightbeam: bool) -> CompilationStrategy {
|
||||||
always_cranelift: bool,
|
|
||||||
always_lightbeam: bool,
|
|
||||||
) -> CompilationStrategy {
|
|
||||||
// Decide how to compile.
|
// Decide how to compile.
|
||||||
match (always_lightbeam, always_cranelift) {
|
match (lightbeam, cranelift) {
|
||||||
#[cfg(feature = "lightbeam")]
|
#[cfg(feature = "lightbeam")]
|
||||||
(true, false) => CompilationStrategy::Lightbeam,
|
(true, false) => CompilationStrategy::Lightbeam,
|
||||||
#[cfg(not(feature = "lightbeam"))]
|
#[cfg(not(feature = "lightbeam"))]
|
||||||
|
|||||||
Reference in New Issue
Block a user