mirror of
https://github.com/remko/waforth
synced 2025-01-18 22:26:39 +01:00
waforth2c: Remove binaryen dependency.
Requires wabt > 1.0.10
This commit is contained in:
parent
a03f8a5fbc
commit
ac79104e20
2 changed files with 1 additions and 8 deletions
|
@ -38,10 +38,6 @@ waforth_core.o: waforth_core.c
|
|||
waforth.gen/waforth_module_%.c waforth.gen/waforth_module_%.h: waforth.gen/waforth_module_%.wasm
|
||||
wasm2c $< -o $(subst .wasm,.c,$<)
|
||||
|
||||
waforth.gen/waforth_module_%.wasm: waforth.gen/waforth_module_%.in.wasm
|
||||
wasm-dis $< -o $(subst .wasm,.wat,$@)
|
||||
wasm-as $(subst .wasm,.wat,$@) -o $@
|
||||
|
||||
waforth.gen/waforth_module_%.o: waforth.gen/waforth_module_%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DWASM_RT_MODULE_PREFIX=$(subst waforth.gen/,,$(subst .o,,$@))_ -c $< -o $@
|
||||
|
||||
|
|
|
@ -119,10 +119,7 @@ WebAssembly.instantiate(coreWasm, {
|
|||
];
|
||||
const moduleFiles = [];
|
||||
for (let i = 0; i < modules.length; ++i) {
|
||||
fs.writeFileSync(
|
||||
"waforth.gen/waforth_module_" + i + ".in.wasm",
|
||||
modules[i]
|
||||
);
|
||||
fs.writeFileSync("waforth.gen/waforth_module_" + i + ".wasm", modules[i]);
|
||||
include.push("#define WASM_RT_MODULE_PREFIX waforth_module_" + i + "_");
|
||||
include.push('#include "waforth.gen/waforth_module_' + i + '.h"');
|
||||
include.push("#undef WASM_RT_MODULE_PREFIX");
|
||||
|
|
Loading…
Reference in a new issue