diff options
| author | Li Jin <dragon-fly@qq.com> | 2024-10-31 17:27:44 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2024-10-31 17:27:44 +0800 |
| commit | 68505bce85d66189d97b7f0ef4ac21e442b007d0 (patch) | |
| tree | c24b97b62e758d54521ada4eb08dd2edeb3f1547 | |
| parent | 37c8f0a862a570af707809d530b3284c6ff9229c (diff) | |
| download | yuescript-68505bce85d66189d97b7f0ef4ac21e442b007d0.tar.gz yuescript-68505bce85d66189d97b7f0ef4ac21e442b007d0.tar.bz2 yuescript-68505bce85d66189d97b7f0ef4ac21e442b007d0.zip | |
Fixed WASM build.v0.26.0
| -rw-r--r-- | makefile | 199 |
1 files changed, 90 insertions, 109 deletions
| @@ -215,82 +215,82 @@ wasm-node: clean | |||
| 215 | @mkdir -p wasm/dist/cjs | 215 | @mkdir -p wasm/dist/cjs |
| 216 | # ESM Module | 216 | # 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 \ |
| 220 | $(SRC_PATH)/yuescript/parser.cpp \ | 220 | $(SRC_PATH)/yuescript/parser.cpp \ |
| 221 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ | 221 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ |
| 222 | $(SRC_PATH)/yuescript/yue_parser.cpp \ | 222 | $(SRC_PATH)/yuescript/yue_parser.cpp \ |
| 223 | $(SRC_PATH)/yuescript/yuescript.cpp \ | 223 | $(SRC_PATH)/yuescript/yuescript.cpp \ |
| 224 | $(SRC_PATH)/3rdParty/lua/liblua.a \ | 224 | $(SRC_PATH)/3rdParty/lua/liblua.a \ |
| 225 | -O2 \ | 225 | -O2 \ |
| 226 | -o wasm/dist/esm/yuescript.mjs \ | 226 | -o wasm/dist/esm/yuescript.mjs \ |
| 227 | -I $(SRC_PATH) \ | 227 | -I $(SRC_PATH) \ |
| 228 | -I $(SRC_PATH)/3rdParty/lua \ | 228 | -I $(SRC_PATH)/3rdParty/lua \ |
| 229 | -std=c++17 \ | 229 | -std=c++17 \ |
| 230 | --bind \ | 230 | --bind \ |
| 231 | -fexceptions \ | 231 | -fexceptions \ |
| 232 | -Wno-deprecated-declarations \ | 232 | -Wno-deprecated-declarations \ |
| 233 | -gsource-map \ | 233 | -gsource-map \ |
| 234 | --emit-tsd="yuescript.d.ts" \ | 234 | --emit-tsd="yuescript.d.ts" \ |
| 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 | -sEXPORTED_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"]' \ |
| 242 | -s EXPORT_ALL=1 \ | 242 | -s EXPORT_ALL=1 \ |
| 243 | -s FS_DEBUG=1 \ | 243 | -s FS_DEBUG=1 \ |
| 244 | -s STACK_SIZE=5MB \ | 244 | -s STACK_SIZE=5MB \ |
| 245 | -s AUTO_JS_LIBRARIES=0 \ | 245 | -s AUTO_JS_LIBRARIES=0 \ |
| 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 | -sGL_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 | # 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 \ |
| 259 | $(SRC_PATH)/yuescript/parser.cpp \ | 259 | $(SRC_PATH)/yuescript/parser.cpp \ |
| 260 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ | 260 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ |
| 261 | $(SRC_PATH)/yuescript/yue_parser.cpp \ | 261 | $(SRC_PATH)/yuescript/yue_parser.cpp \ |
| 262 | $(SRC_PATH)/yuescript/yuescript.cpp \ | 262 | $(SRC_PATH)/yuescript/yuescript.cpp \ |
| 263 | $(SRC_PATH)/3rdParty/lua/liblua.a \ | 263 | $(SRC_PATH)/3rdParty/lua/liblua.a \ |
| 264 | -O2 \ | 264 | -O2 \ |
| 265 | -o wasm/dist/cjs/yuescript.cjs \ | 265 | -o wasm/dist/cjs/yuescript.cjs \ |
| 266 | --emit-tsd="yuescript.d.ts" \ | 266 | --emit-tsd="yuescript.d.ts" \ |
| 267 | -I $(SRC_PATH) \ | 267 | -I $(SRC_PATH) \ |
| 268 | -I $(SRC_PATH)/3rdParty/lua \ | 268 | -I $(SRC_PATH)/3rdParty/lua \ |
| 269 | -std=c++17 \ | 269 | -std=c++17 \ |
| 270 | --bind \ | 270 | --bind \ |
| 271 | -fexceptions \ | 271 | -fexceptions \ |
| 272 | -Wno-deprecated-declarations \ | 272 | -Wno-deprecated-declarations \ |
| 273 | -gsource-map \ | 273 | -gsource-map \ |
| 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 | -sEXPORTED_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"]' \ |
| 281 | -s EXPORT_ALL=1 \ | 281 | -s EXPORT_ALL=1 \ |
| 282 | -s FS_DEBUG=1 \ | 282 | -s FS_DEBUG=1 \ |
| 283 | -s STACK_SIZE=5MB \ | 283 | -s STACK_SIZE=5MB \ |
| 284 | -s AUTO_JS_LIBRARIES=0 \ | 284 | -s AUTO_JS_LIBRARIES=0 \ |
| 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 | -sGL_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 | @${MAKE} clean | 294 | @${MAKE} clean |
| 295 | 295 | ||
| 296 | .PHONY: wasm | 296 | .PHONY: wasm |
| @@ -298,40 +298,21 @@ wasm: clean | |||
| 298 | @$(MAKE) generic CC='emcc' AR='emar rcu' RANLIB='emranlib' -C $(SRC_PATH)/3rdParty/lua | 298 | @$(MAKE) generic CC='emcc' AR='emar rcu' RANLIB='emranlib' -C $(SRC_PATH)/3rdParty/lua |
| 299 | @mkdir -p doc/docs/.vuepress/public/js | 299 | @mkdir -p doc/docs/.vuepress/public/js |
| 300 | @emcc $(SRC_PATH)/yue_wasm.cpp \ | 300 | @emcc $(SRC_PATH)/yue_wasm.cpp \ |
| 301 | $(SRC_PATH)/yuescript/ast.cpp \ | 301 | $(SRC_PATH)/yuescript/ast.cpp \ |
| 302 | $(SRC_PATH)/yuescript/yue_ast.cpp \ | 302 | $(SRC_PATH)/yuescript/yue_ast.cpp \ |
| 303 | $(SRC_PATH)/yuescript/parser.cpp \ | 303 | $(SRC_PATH)/yuescript/parser.cpp \ |
| 304 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ | 304 | $(SRC_PATH)/yuescript/yue_compiler.cpp \ |
| 305 | $(SRC_PATH)/yuescript/yue_parser.cpp \ | 305 | $(SRC_PATH)/yuescript/yue_parser.cpp \ |
| 306 | $(SRC_PATH)/yuescript/yuescript.cpp \ | 306 | $(SRC_PATH)/yuescript/yuescript.cpp \ |
| 307 | $(SRC_PATH)/3rdParty/lua/liblua.a \ | 307 | $(SRC_PATH)/3rdParty/lua/liblua.a \ |
| 308 | -O2 \ | 308 | -O2 \ |
| 309 | -o doc/docs/.vuepress/public/js/yuescript.js \ | 309 | -o doc/docs/.vuepress/public/js/yuescript.js \ |
| 310 | -I $(SRC_PATH) \ | 310 | -I $(SRC_PATH) \ |
| 311 | -I $(SRC_PATH)/3rdParty/lua \ | 311 | -I $(SRC_PATH)/3rdParty/lua \ |
| 312 | -std=c++17 \ | 312 | -std=c++17 \ |
| 313 | --bind \ | 313 | --bind \ |
| 314 | -fexceptions \ | 314 | -fexceptions \ |
| 315 | -Wno-deprecated-declarations \ | 315 | -Wno-deprecated-declarations |
| 316 | -s EXPORT_EXCEPTION_HANDLING_HELPERS \ | ||
| 317 | -s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \ | ||
| 318 | -sEXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \ | ||
| 319 | -s FORCE_FILESYSTEM=1 \ | ||
| 320 | -s TOTAL_MEMORY=20971520 \ | ||
| 321 | -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ | ||
| 322 | -s EXPORT_ALL=1 \ | ||
| 323 | -s FS_DEBUG=1 \ | ||
| 324 | -s STACK_SIZE=5MB \ | ||
| 325 | -s AUTO_JS_LIBRARIES=0 \ | ||
| 326 | -s AUTO_NATIVE_LIBRARIES=0 \ | ||
| 327 | -s NODEJS_CATCH_EXIT=0 \ | ||
| 328 | -s NODEJS_CATCH_REJECTION=0 \ | ||
| 329 | -sGL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 \ | ||
| 330 | -s USE_ZLIB \ | ||
| 331 | -s USE_BZIP2 \ | ||
| 332 | -s WASM_BIGINT\ | ||
| 333 | -s MODULARIZE=1 \ | ||
| 334 | -s LZ4=1 | ||
| 335 | @${MAKE} clean | 316 | @${MAKE} clean |
| 336 | 317 | ||
| 337 | # Debug build for gdb debugging | 318 | # Debug build for gdb debugging |
