Tweak wasm binding to work with new upstream LLVM backend
This commit is contained in:
parent
49c632ae90
commit
7ccec8c0e2
2 changed files with 4 additions and 3 deletions
|
|
@ -874,7 +874,10 @@ class Language {
|
|||
return bytes
|
||||
.then(bytes => loadWebAssemblyModule(bytes, {loadAsync: true}))
|
||||
.then(mod => {
|
||||
const functionName = Object.keys(mod).find(key => key.includes("tree_sitter_"));
|
||||
const functionName = Object.keys(mod).find(key =>
|
||||
key.includes("tree_sitter_") &&
|
||||
!key.includes("external_scanner_")
|
||||
);
|
||||
const languageAddress = mod[functionName]();
|
||||
return new Language(INTERNAL, languageAddress);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,14 +62,12 @@ done
|
|||
|
||||
emcc=
|
||||
if which emcc > /dev/null && [[ "$force_docker" == "0" ]]; then
|
||||
export EMCC_FORCE_STDLIBS=libc++
|
||||
emcc=emcc
|
||||
elif which docker > /dev/null; then
|
||||
emcc="docker run \
|
||||
--rm \
|
||||
-v $(pwd):/src:Z \
|
||||
-u $(id -u) \
|
||||
-e EMCC_FORCE_STDLIBS=libc++ \
|
||||
trzeci/emscripten-slim \
|
||||
emcc"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue