renamed feature flag deterministic to deterministic-execution

This commit is contained in:
Yaron Wittenstein 2019-10-07 23:07:20 +03:00
parent 899099f325
commit 3489bfb9b9
6 changed files with 21 additions and 11 deletions

View File

@ -58,4 +58,4 @@ trace = ["debug"]
"backend-singlepass" = [] "backend-singlepass" = []
"backend-llvm" = [] "backend-llvm" = []
managed = [] managed = []
deterministic = ["wasmparser/deterministic"] deterministic-execution = ["wasmparser/deterministic"]

View File

@ -146,7 +146,7 @@ pub fn validating_parser_config(features: &Features) -> wasmparser::ValidatingPa
enable_bulk_memory: false, enable_bulk_memory: false,
enable_multi_value: false, enable_multi_value: false,
#[cfg(feature = "deterministic")] #[cfg(feature = "deterministic-execution")]
deterministic_only: true, deterministic_only: true,
}, },
} }

View File

@ -146,7 +146,7 @@ pub fn validate_and_report_errors_with_features(
enable_reference_types: false, enable_reference_types: false,
enable_threads: features.threads, enable_threads: features.threads,
#[cfg(feature = "deterministic")] #[cfg(feature = "deterministic-execution")]
deterministic_only: true, deterministic_only: true,
}, },
}; };

View File

@ -41,7 +41,7 @@ singlepass = ["wasmer-singlepass-backend"]
default-backend-singlepass = ["singlepass"] default-backend-singlepass = ["singlepass"]
default-backend-llvm = ["llvm"] default-backend-llvm = ["llvm"]
default-backend-cranelift = ["cranelift"] default-backend-cranelift = ["cranelift"]
deterministic = ["wasmer-singlepass-backend/deterministic", "wasmer-runtime-core/deterministic"] deterministic-execution = ["wasmer-singlepass-backend/deterministic-execution", "wasmer-runtime-core/deterministic-execution"]
[[bench]] [[bench]]
name = "nginx" name = "nginx"

View File

@ -200,14 +200,20 @@ pub fn default_compiler() -> impl Compiler {
any( any(
feature = "default-backend-cranelift", feature = "default-backend-cranelift",
feature = "default-backend-singlepass", feature = "default-backend-singlepass",
feature = "deterministic" feature = "deterministic-execution"
) )
), ),
all( all(
feature = "default-backend-cranelift", feature = "default-backend-cranelift",
any(feature = "default-backend-singlepass", feature = "deterministic") any(
feature = "default-backend-singlepass",
feature = "deterministic-execution"
)
), ),
all(feature = "default-backend-singlepass", feature = "deterministic") all(
feature = "default-backend-singlepass",
feature = "deterministic-execution"
)
))] ))]
compile_error!( compile_error!(
"The `default-backend-X` features are mutually exclusive. Please choose just one" "The `default-backend-X` features are mutually exclusive. Please choose just one"
@ -216,7 +222,10 @@ pub fn default_compiler() -> impl Compiler {
#[cfg(feature = "default-backend-llvm")] #[cfg(feature = "default-backend-llvm")]
use wasmer_llvm_backend::LLVMCompiler as DefaultCompiler; use wasmer_llvm_backend::LLVMCompiler as DefaultCompiler;
#[cfg(any(feature = "default-backend-singlepass", feature = "deterministic"))] #[cfg(any(
feature = "default-backend-singlepass",
feature = "deterministic-execution"
))]
use wasmer_singlepass_backend::SinglePassCompiler as DefaultCompiler; use wasmer_singlepass_backend::SinglePassCompiler as DefaultCompiler;
#[cfg(feature = "default-backend-cranelift")] #[cfg(feature = "default-backend-cranelift")]
@ -235,7 +244,7 @@ pub fn compiler_for_backend(backend: Backend) -> Option<Box<dyn Compiler>> {
#[cfg(feature = "cranelift")] #[cfg(feature = "cranelift")]
Backend::Cranelift => Some(Box::new(wasmer_clif_backend::CraneliftCompiler::new())), Backend::Cranelift => Some(Box::new(wasmer_clif_backend::CraneliftCompiler::new())),
#[cfg(feature = "singlepass")] #[cfg(any(feature = "singlepass", feature = "deterministic-execution"))]
Backend::Singlepass => Some(Box::new( Backend::Singlepass => Some(Box::new(
wasmer_singlepass_backend::SinglePassCompiler::new(), wasmer_singlepass_backend::SinglePassCompiler::new(),
)), )),
@ -246,7 +255,8 @@ pub fn compiler_for_backend(backend: Backend) -> Option<Box<dyn Compiler>> {
#[cfg(any( #[cfg(any(
not(feature = "llvm"), not(feature = "llvm"),
not(feature = "singlepass"), not(feature = "singlepass"),
not(feature = "cranelift") not(feature = "cranelift"),
not(feature = "deterministic-execution"),
))] ))]
_ => None, _ => None,
} }

View File

@ -21,4 +21,4 @@ smallvec = "0.6"
[features] [features]
default = [] default = []
deterministic = ["wasmparser/deterministic", "wasmer-runtime-core/deterministic"] deterministic-execution = ["wasmparser/deterministic", "wasmer-runtime-core/deterministic-execution"]