Skip to content

Commit 6ee8a4a

Browse files
committed
Reintroduce cranelift feature for debugging purposes
1 parent 61635b8 commit 6ee8a4a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/vm/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ staking = ["cosmwasm-std/staking"]
2020
stargate = ["cosmwasm-std/stargate"]
2121
# Use cranelift backend instead of singlepass. This is required for development on Windows.
2222
#
23-
# LEGACY: This doesn't do anything anymore. Cranelift is automatically pulled in on Windows.
24-
cranelift = []
23+
# Note: This feature is automatically enabled on Windows, you don't have to toggle it manually anymore.
24+
# This is just to be able to debug issues with Cranelift on non-Windows platforms.
25+
cranelift = ["wasmer/cranelift"]
2526
# For heap profiling. Only used in the "heap_profiling" example.
2627
dhat-heap = ["dep:dhat"]
2728

packages/vm/src/wasm_backend/engine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ fn cost(_operator: &Operator) -> u64 {
2828

2929
/// Creates the appropriate compiler config for the platform
3030
pub fn make_compiler_config() -> impl CompilerConfig + Into<Engine> {
31-
#[cfg(target_family = "windows")]
31+
#[cfg(any(feature = "cranelift", target_family = "windows"))]
3232
return wasmer::Cranelift::new();
33-
#[cfg(not(target_family = "windows"))]
33+
#[cfg(not(any(feature = "cranelift", target_family = "windows")))]
3434
wasmer::Singlepass::new()
3535
}
3636

0 commit comments

Comments
 (0)