1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

wasm: remove dependency on thirdparty/binaryen, webassembly backend rewrite (#18120)

This commit is contained in:
l-m
2023-07-12 12:24:38 +00:00
committed by GitHub
parent 1c7df29bed
commit c422919481
40 changed files with 2895 additions and 6166 deletions

0
cmd/tools/install_wabt.vsh Normal file → Executable file
View File

View File

@@ -193,18 +193,7 @@ fn rebuild(prefs &pref.Preferences) {
util.launch_tool(prefs.is_verbose, 'builders/golang_builder', os.args[1..])
}
.wasm {
assert_wasm_backend_thirdparty()
util.launch_tool(prefs.is_verbose, 'builders/wasm_builder', os.args[1..])
}
}
}
fn assert_wasm_backend_thirdparty() {
vroot := os.dir(pref.vexe_path())
if !os.exists('${vroot}/cmd/tools/builders/wasm_builder')
&& !os.exists('${vroot}/thirdparty/binaryen') {
eprintln('The WebAssembly backend requires `binaryen`, an external library dependency')
eprintln('This can be installed with `./cmd/tools/install_binaryen.vsh`, to download prebuilt libraries for your platform')
exit(1)
}
}