Emit wasm sections only when compiling to wasm (#8845)

This commit is contained in:
Sergei Shulepov authored and GitHub committed 2021-05-18 12:06:35 +00:00
1 parent 2b8be8cf1e
commit bee5c2dd71
3 files changed
+16

No files matched your search

@@ -675,6 +675,7 @@ fn generate_runtime_api_versions(impls: &[ItemImpl]) -> Result<TokenStream> {
#( #attrs )*
const _: () = {
// All sections with the same name are going to be merged by concatenation.
#[cfg(not(feature = "std"))]
#[link_section = "runtime_apis"]
static SECTION_CONTENTS: [u8; 12] = #c::serialize_runtime_api_info(#id, #version);
};