From 2ef7448e62c6a9990ba9d23e68f8460dab286820 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Tue, 9 Jul 2019 17:57:31 -0700 Subject: [PATCH] remove colons from feature names --- Cargo.toml | 4 ++-- Makefile | 8 ++++---- lib/runtime-core/Cargo.toml | 4 ++-- lib/runtime-core/src/backend.rs | 4 ++-- src/bin/wasmer.rs | 22 +++++++++++----------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b30b0b334..017d18e15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,8 +73,8 @@ trace = ["wasmer-runtime-core/trace"] extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"] # This feature will allow cargo test to run much faster fast-tests = [] -"backend:llvm" = ["wasmer-llvm-backend", "wasmer-runtime-core/backend:llvm"] -"backend:singlepass" = ["wasmer-singlepass-backend", "wasmer-runtime-core/backend:singlepass"] +"backend-llvm" = ["wasmer-llvm-backend", "wasmer-runtime-core/backend-llvm"] +"backend-singlepass" = ["wasmer-singlepass-backend", "wasmer-runtime-core/backend-singlepass"] wasi = ["wasmer-wasi"] # vfs = ["wasmer-runtime-abi"] diff --git a/Makefile b/Makefile index a8a56ef40..38fbb8dc4 100644 --- a/Makefile +++ b/Makefile @@ -112,13 +112,13 @@ lint: precommit: lint test debug: - cargo build --release --features backend:singlepass,debug,trace + cargo build --release --features backend-singlepass,debug,trace install: cargo install --path . release: - cargo build --release --features backend:singlepass,backend:llvm,loader:kernel + cargo build --release --features backend-singlepass,backend-llvm,loader:kernel # Only one backend (cranelift) release-fast: @@ -127,10 +127,10 @@ release-fast: cargo build --release release-singlepass: - cargo build --release --features backend:singlepass + cargo build --release --features backend-singlepass release-llvm: - cargo build --release --features backend:llvm + cargo build --release --features backend-llvm bench: cargo bench --all diff --git a/lib/runtime-core/Cargo.toml b/lib/runtime-core/Cargo.toml index b35acaa45..efded2fb3 100644 --- a/lib/runtime-core/Cargo.toml +++ b/lib/runtime-core/Cargo.toml @@ -55,5 +55,5 @@ cc = "1.0" debug = [] trace = ["debug"] # backend flags used in conditional compilation of Backend::variants -"backend:singlepass" = [] -"backend:llvm" = [] +"backend-singlepass" = [] +"backend-llvm" = [] diff --git a/lib/runtime-core/src/backend.rs b/lib/runtime-core/src/backend.rs index 2c51cb576..aa1f6c730 100644 --- a/lib/runtime-core/src/backend.rs +++ b/lib/runtime-core/src/backend.rs @@ -33,9 +33,9 @@ impl Backend { pub fn variants() -> &'static [&'static str] { &[ "cranelift", - #[cfg(feature = "backend:singlepass")] + #[cfg(feature = "backend-singlepass")] "singlepass", - #[cfg(feature = "backend:llvm")] + #[cfg(feature = "backend-llvm")] "llvm", ] } diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index d1e46fbd6..7542e3289 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -15,7 +15,7 @@ use structopt::StructOpt; use wasmer::*; use wasmer_clif_backend::CraneliftCompiler; -#[cfg(feature = "backend:llvm")] +#[cfg(feature = "backend-llvm")] use wasmer_llvm_backend::LLVMCompiler; use wasmer_runtime::{ cache::{Cache as BaseCache, FileSystemCache, WasmHash, WASMER_VERSION_HASH}, @@ -27,7 +27,7 @@ use wasmer_runtime_core::{ debug, loader::{Instance as LoadedInstance, LocalLoader}, }; -#[cfg(feature = "backend:singlepass")] +#[cfg(feature = "backend-singlepass")] use wasmer_singlepass_backend::SinglePassCompiler; #[cfg(feature = "wasi")] use wasmer_wasi; @@ -112,7 +112,7 @@ struct Run { )] loader: Option, - #[cfg(feature = "backend:singlepass")] + #[cfg(feature = "backend-singlepass")] #[structopt(long = "resume")] resume: Option, @@ -315,14 +315,14 @@ fn execute_wasm(options: &Run) -> Result<(), String> { } let compiler: Box = match options.backend { - #[cfg(feature = "backend:singlepass")] + #[cfg(feature = "backend-singlepass")] Backend::Singlepass => Box::new(SinglePassCompiler::new()), - #[cfg(not(feature = "backend:singlepass"))] + #[cfg(not(feature = "backend-singlepass"))] Backend::Singlepass => return Err("The singlepass backend is not enabled".to_string()), Backend::Cranelift => Box::new(CraneliftCompiler::new()), - #[cfg(feature = "backend:llvm")] + #[cfg(feature = "backend-llvm")] Backend::LLVM => Box::new(LLVMCompiler::new()), - #[cfg(not(feature = "backend:llvm"))] + #[cfg(not(feature = "backend-llvm"))] Backend::LLVM => return Err("the llvm backend is not enabled".to_string()), }; @@ -501,7 +501,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> { let start: Func<(), ()> = instance.func("_start").map_err(|e| format!("{:?}", e))?; - #[cfg(feature = "backend:singlepass")] + #[cfg(feature = "backend-singlepass")] unsafe { if options.backend == Backend::Singlepass { use wasmer_runtime_core::fault::{catch_unsafe_unwind, ensure_sighandler}; @@ -608,18 +608,18 @@ fn execute_wasm(options: &Run) -> Result<(), String> { Ok(()) } -#[cfg(feature = "backend:singlepass")] +#[cfg(feature = "backend-singlepass")] struct InteractiveShellContext { image: Option, } -#[cfg(feature = "backend:singlepass")] +#[cfg(feature = "backend-singlepass")] #[derive(Debug)] enum ShellExitOperation { ContinueWith(wasmer_runtime_core::state::InstanceImage), } -#[cfg(feature = "backend:singlepass")] +#[cfg(feature = "backend-singlepass")] fn interactive_shell(mut ctx: InteractiveShellContext) -> ShellExitOperation { use std::io::Write;