diff options
| author | Li Jin <dragon-fly@qq.com> | 2024-10-31 22:36:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2024-10-31 22:36:15 +0800 |
| commit | 8a3d78c4d5bfe2ba39173e91146025278bf0deb2 (patch) | |
| tree | 3f2e8dcddb51d56b50dfb8f6c3a54123810aaa13 /makefile | |
| parent | 68505bce85d66189d97b7f0ef4ac21e442b007d0 (diff) | |
| download | yuescript-8a3d78c4d5bfe2ba39173e91146025278bf0deb2.tar.gz yuescript-8a3d78c4d5bfe2ba39173e91146025278bf0deb2.tar.bz2 yuescript-8a3d78c4d5bfe2ba39173e91146025278bf0deb2.zip | |
Updated WASM build.
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 13 |
1 files changed, 7 insertions, 6 deletions
| @@ -213,7 +213,7 @@ wasm-node: clean | |||
| 213 | @mkdir -p wasm/dist | 213 | @mkdir -p wasm/dist |
| 214 | @mkdir -p wasm/dist/esm | 214 | @mkdir -p wasm/dist/esm |
| 215 | @mkdir -p wasm/dist/cjs | 215 | @mkdir -p wasm/dist/cjs |
| 216 | # ESM Module | 216 | @echo "Build ESM Module" |
| 217 | @emcc $(SRC_PATH)/yue_wasm.cpp \ | 217 | @emcc $(SRC_PATH)/yue_wasm.cpp \ |
| 218 | $(SRC_PATH)/yuescript/ast.cpp \ | 218 | $(SRC_PATH)/yuescript/ast.cpp \ |
| 219 | $(SRC_PATH)/yuescript/yue_ast.cpp \ | 219 | $(SRC_PATH)/yuescript/yue_ast.cpp \ |
| @@ -235,7 +235,7 @@ wasm-node: clean | |||
| 235 | -s EXPORT_NAME="'_createYuescriptModule'" \ | 235 | -s EXPORT_NAME="'_createYuescriptModule'" \ |
| 236 | -s EXPORT_EXCEPTION_HANDLING_HELPERS \ | 236 | -s EXPORT_EXCEPTION_HANDLING_HELPERS \ |
| 237 | -s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \ | 237 | -s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \ |
| 238 | -sEXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \ | 238 | -s EXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \ |
| 239 | -s FORCE_FILESYSTEM=1 \ | 239 | -s FORCE_FILESYSTEM=1 \ |
| 240 | -s TOTAL_MEMORY=20971520 \ | 240 | -s TOTAL_MEMORY=20971520 \ |
| 241 | -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ | 241 | -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ |
| @@ -246,13 +246,13 @@ wasm-node: clean | |||
| 246 | -s AUTO_NATIVE_LIBRARIES=0 \ | 246 | -s AUTO_NATIVE_LIBRARIES=0 \ |
| 247 | -s NODEJS_CATCH_EXIT=0 \ | 247 | -s NODEJS_CATCH_EXIT=0 \ |
| 248 | -s NODEJS_CATCH_REJECTION=0 \ | 248 | -s NODEJS_CATCH_REJECTION=0 \ |
| 249 | -sGL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 \ | 249 | -s GL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 \ |
| 250 | -s USE_ZLIB \ | 250 | -s USE_ZLIB \ |
| 251 | -s USE_BZIP2 \ | 251 | -s USE_BZIP2 \ |
| 252 | -s WASM_BIGINT \ | 252 | -s WASM_BIGINT \ |
| 253 | -s MODULARIZE=1 \ | 253 | -s MODULARIZE=1 \ |
| 254 | -s LZ4=1 | 254 | -s LZ4=1 |
| 255 | # CommonJS Module | 255 | @echo "Build CommonJS Module" |
| 256 | @emcc $(SRC_PATH)/yue_wasm.cpp \ | 256 | @emcc $(SRC_PATH)/yue_wasm.cpp \ |
| 257 | $(SRC_PATH)/yuescript/ast.cpp \ | 257 | $(SRC_PATH)/yuescript/ast.cpp \ |
| 258 | $(SRC_PATH)/yuescript/yue_ast.cpp \ | 258 | $(SRC_PATH)/yuescript/yue_ast.cpp \ |
| @@ -274,7 +274,7 @@ wasm-node: clean | |||
| 274 | -s EXPORT_NAME="'_createYuescriptModule'" \ | 274 | -s EXPORT_NAME="'_createYuescriptModule'" \ |
| 275 | -s EXPORT_EXCEPTION_HANDLING_HELPERS \ | 275 | -s EXPORT_EXCEPTION_HANDLING_HELPERS \ |
| 276 | -s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \ | 276 | -s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \ |
| 277 | -sEXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \ | 277 | -s EXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \ |
| 278 | -s FORCE_FILESYSTEM=1 \ | 278 | -s FORCE_FILESYSTEM=1 \ |
| 279 | -s TOTAL_MEMORY=20971520 \ | 279 | -s TOTAL_MEMORY=20971520 \ |
| 280 | -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ | 280 | -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ |
| @@ -285,12 +285,13 @@ wasm-node: clean | |||
| 285 | -s AUTO_NATIVE_LIBRARIES=0 \ | 285 | -s AUTO_NATIVE_LIBRARIES=0 \ |
| 286 | -s NODEJS_CATCH_EXIT=0 \ | 286 | -s NODEJS_CATCH_EXIT=0 \ |
| 287 | -s NODEJS_CATCH_REJECTION=0 \ | 287 | -s NODEJS_CATCH_REJECTION=0 \ |
| 288 | -sGL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 \ | 288 | -s GL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 \ |
| 289 | -s USE_ZLIB \ | 289 | -s USE_ZLIB \ |
| 290 | -s USE_BZIP2 \ | 290 | -s USE_BZIP2 \ |
| 291 | -s WASM_BIGINT\ | 291 | -s WASM_BIGINT\ |
| 292 | -s MODULARIZE=1\ | 292 | -s MODULARIZE=1\ |
| 293 | -s LZ4=1 | 293 | -s LZ4=1 |
| 294 | |||
| 294 | @${MAKE} clean | 295 | @${MAKE} clean |
| 295 | 296 | ||
| 296 | .PHONY: wasm | 297 | .PHONY: wasm |
