From 3a75b26488fd616c9771f2599f7bd4925da8e287 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 22 May 2023 19:30:46 +0800 Subject: [PATCH] Companion of paritytech/cumulus#2308 --- runtime/crab/build.rs | 4 ++++ runtime/darwinia/build.rs | 4 ++++ runtime/pangolin/build.rs | 4 ++++ runtime/pangoro/build.rs | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/runtime/crab/build.rs b/runtime/crab/build.rs index 4a1101a97..05785b550 100644 --- a/runtime/crab/build.rs +++ b/runtime/crab/build.rs @@ -19,6 +19,10 @@ // crates.io use substrate_wasm_builder::WasmBuilder; +#[cfg(feature = "std")] fn main() { WasmBuilder::new().with_current_project().export_heap_base().import_memory().build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/runtime/darwinia/build.rs b/runtime/darwinia/build.rs index 4a1101a97..05785b550 100644 --- a/runtime/darwinia/build.rs +++ b/runtime/darwinia/build.rs @@ -19,6 +19,10 @@ // crates.io use substrate_wasm_builder::WasmBuilder; +#[cfg(feature = "std")] fn main() { WasmBuilder::new().with_current_project().export_heap_base().import_memory().build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/runtime/pangolin/build.rs b/runtime/pangolin/build.rs index 4a1101a97..05785b550 100644 --- a/runtime/pangolin/build.rs +++ b/runtime/pangolin/build.rs @@ -19,6 +19,10 @@ // crates.io use substrate_wasm_builder::WasmBuilder; +#[cfg(feature = "std")] fn main() { WasmBuilder::new().with_current_project().export_heap_base().import_memory().build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/runtime/pangoro/build.rs b/runtime/pangoro/build.rs index 4a1101a97..05785b550 100644 --- a/runtime/pangoro/build.rs +++ b/runtime/pangoro/build.rs @@ -19,6 +19,10 @@ // crates.io use substrate_wasm_builder::WasmBuilder; +#[cfg(feature = "std")] fn main() { WasmBuilder::new().with_current_project().export_heap_base().import_memory().build() } + +#[cfg(not(feature = "std"))] +fn main() {}