From b3c873cd8aed848f7b5704d96159e3f26ddc7e3d Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 14 Jul 2020 17:42:24 -0700 Subject: [PATCH] Trying to fix windows compilation --- Makefile | 2 +- examples/compiler_cranelift.rs | 1 + examples/compiler_llvm.rs | 1 + examples/compiler_singlepass.rs | 1 + examples/engine_cross_compilation.rs | 1 + examples/wasi.rs | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 052250609..0b7b99dc6 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,7 @@ test-wasi-unit: cargo test --manifest-path lib/wasi/Cargo.toml --release test-examples: - cargo test --release --features "test-cranelift" --examples + cargo test --release $(compiler_features) --features wasi --examples ############# # Packaging # diff --git a/examples/compiler_cranelift.rs b/examples/compiler_cranelift.rs index 2214ac489..f59773a5b 100644 --- a/examples/compiler_cranelift.rs +++ b/examples/compiler_cranelift.rs @@ -9,6 +9,7 @@ //! ``` //! //! Ready? +#![cfg(feature = "cranelift")] use wasmer::{imports, wat2wasm, Instance, Module, Store, Value}; use wasmer_compiler_cranelift::Cranelift; diff --git a/examples/compiler_llvm.rs b/examples/compiler_llvm.rs index b35127947..a8efb00f0 100644 --- a/examples/compiler_llvm.rs +++ b/examples/compiler_llvm.rs @@ -9,6 +9,7 @@ //! ``` //! //! Ready? +#![cfg(feature = "llvm")] use wasmer::{imports, wat2wasm, Instance, Module, Store, Value}; use wasmer_compiler_llvm::LLVM; diff --git a/examples/compiler_singlepass.rs b/examples/compiler_singlepass.rs index 03cd596e1..b083b9a92 100644 --- a/examples/compiler_singlepass.rs +++ b/examples/compiler_singlepass.rs @@ -9,6 +9,7 @@ //! ``` //! //! Ready? +#![cfg(feature = "singlepass")] use wasmer::{imports, wat2wasm, Instance, Module, Store, Value}; use wasmer_compiler_singlepass::Singlepass; diff --git a/examples/engine_cross_compilation.rs b/examples/engine_cross_compilation.rs index dbd1fd879..e73819380 100644 --- a/examples/engine_cross_compilation.rs +++ b/examples/engine_cross_compilation.rs @@ -17,6 +17,7 @@ //! ``` //! //! Ready? +#![cfg(not(windows))] use std::str::FromStr; use wasmer::{wat2wasm, Module, RuntimeError, Store}; diff --git a/examples/wasi.rs b/examples/wasi.rs index 680d2f4c0..0140d2386 100644 --- a/examples/wasi.rs +++ b/examples/wasi.rs @@ -14,6 +14,7 @@ //! ``` //! //! Ready? +#![cfg(feature = "wasi")] use wasmer::{Instance, Module, Store}; use wasmer_compiler_cranelift::Cranelift;