diff --git a/compiler/lib/linker.ml b/compiler/lib/linker.ml index d9c93b3002..a49cd797d2 100644 --- a/compiler/lib/linker.ml +++ b/compiler/lib/linker.ml @@ -186,7 +186,14 @@ module Fragment = struct List.fold_left ~f:(fun m (k, v) -> StringMap.add k v m) ~init:StringMap.empty - [ "js-string", Config.Flag.use_js_string; "effects", Config.Flag.effects ] + [ "js-string", Config.Flag.use_js_string + ; "effects", Config.Flag.effects + ; ( "wasm" + , fun () -> + match Config.target () with + | `JavaScript -> false + | `Wasm -> true ) + ] type t = | Always_include of Javascript.program pack diff --git a/runtime/sys.js b/runtime/sys.js index 92c402bbd7..14f4c76241 100644 --- a/runtime/sys.js +++ b/runtime/sys.js @@ -357,6 +357,7 @@ function caml_sys_is_regular_file(name) { } //Always //Requires: caml_fatal_uncaught_exception +//If: !wasm function caml_setup_uncaught_exception_handler() { var process = globalThis.process; if(process && process.on) {