diff --git a/substrate/wasm-runtime/polkadot/src/support/environment.rs b/substrate/wasm-runtime/polkadot/src/support/environment.rs index 901c5407fb..1011b3168b 100644 --- a/substrate/wasm-runtime/polkadot/src/support/environment.rs +++ b/substrate/wasm-runtime/polkadot/src/support/environment.rs @@ -41,7 +41,7 @@ pub fn with_env T>(f: F) -> T { f(&mut *eb) } -#[cfg(not(test))] +#[cfg(target_arch = "wasm32")] fn env() -> Rc> { // Initialize it to a null value static mut SINGLETON: *const Rc> = 0 as *const Rc>; @@ -60,7 +60,7 @@ fn env() -> Rc> { } } -#[cfg(test)] +#[cfg(not(target_arch = "wasm32"))] fn env() -> Rc> { // Initialize it to a null value thread_local!{