Skip to content

Commit c32215e

Browse files
authored
[Js_of_ocaml] Update jsoo build process for libbinaryen (#8565)
When #7995 was merged it broke our upgrade process in libbinaryen. This pr fixes our build process. JS_OF_OCAML still doesn't support esm modules however it supports es6 features, so we can safely remove `target_link_libraries(binaryen_js PRIVATE optimized "--closure-args=\"--language_out=ECMASCRIPT5\"")`. Because we are not using esm modules and jsoo doesn't support top level awaits we need to dissable async compilation.
1 parent ef18138 commit c32215e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,8 @@ if(EMSCRIPTEN)
550550
if(JS_OF_OCAML)
551551
# js_of_ocaml needs a specified variable with special comment to provide the library to consumer
552552
target_link_libraries(binaryen_js PRIVATE "--extern-pre-js=${CMAKE_CURRENT_SOURCE_DIR}/src/js/binaryen.jsoo-extern-pre.js")
553-
# Currently, js_of_ocaml can only process ES5 code
554-
target_link_libraries(binaryen_js PRIVATE optimized "--closure-args=\"--language_out=ECMASCRIPT5\"")
553+
# js_of_ocaml does not support top level await
554+
target_link_libraries(binaryen_js PRIVATE "-sWASM_ASYNC_COMPILATION=0")
555555
else()
556556
target_link_libraries(binaryen_js PRIVATE "-sEXPORT_ES6")
557557
endif()

0 commit comments

Comments
 (0)