diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:51:30 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 11:51:30 -0800 |
commit | 34b3a09aae11f04deb08c14954707f99b0d49b83 (patch) | |
tree | 1d2c170aa772acf2af099014c18bfe0e944fabd0 /src | |
parent | 904aba781d4cdd7074d2f8d4faa833207a31e83e (diff) | |
download | binaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.tar.gz binaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.tar.bz2 binaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.zip |
enable imports in emcc builds
Diffstat (limited to 'src')
-rw-r--r-- | src/asm2wasm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index e2b853a07..c8dd3f9dd 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -787,13 +787,14 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } Call* ret; if (wasm.imports.find(name) != wasm.imports.end()) { +#ifndef __EMSCRIPTEN__ // no imports yet in reference interpreter, fake it AsmType asmType = detectAsmType(astStackHelper.getParent(), &asmData); if (asmType == ASM_NONE) return allocator.alloc<Nop>(); if (asmType == ASM_INT) return allocator.alloc<Const>()->set(Literal((int32_t)0)); if (asmType == ASM_DOUBLE) return allocator.alloc<Const>()->set(Literal((double)0.0)); abort(); -#if 0 +#else ret = allocator.alloc<CallImport>(); noteImportedFunctionCall(ast, astStackHelper.getParent(), &asmData); #endif |