From 28ba5fe1b8f21e01207a5b15ed9a44f185e9ea7c Mon Sep 17 00:00:00 2001 From: Jinny You Date: Mon, 11 Dec 2023 11:56:59 +0900 Subject: [PATCH] wasm: Update emscripten build config enabled options: - EXPORT_ES6 > to import glue code in es6 module system - SINGLE_FILE > to build library as a single JS file, single file reduces loading latency - MODULARIZE > proper option to build es6 module (optimized) - EXPORTED_RUNTIME_METHODS > allow es6 module based glue code to import FS --- cross/wasm_x86_i686.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross/wasm_x86_i686.txt b/cross/wasm_x86_i686.txt index 57d0d314..80f9e3ca 100644 --- a/cross/wasm_x86_i686.txt +++ b/cross/wasm_x86_i686.txt @@ -12,7 +12,7 @@ exe_suffix = 'js' [built-in options] cpp_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions'] -cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sFORCE_FILESYSTEM=1'] +cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sEXPORT_ES6=1', '-sFORCE_FILESYSTEM=1', '-sMODULARIZE=1', '-sEXPORTED_RUNTIME_METHODS=FS', '-sSINGLE_FILE=1'] #cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sFORCE_FILESYSTEM=1', '-g'] //enable g flag for wasm debugging [host_machine]