Skip to content

Commit 63e28d9

Browse files
committed
Change Emscripten build options to nqc.js SINGLE_FILE
1 parent 24527bf commit 63e28d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,20 @@ ifneq (,$(strip $(findstring $(TARGETTYPE), WebAssembly)))
9494
CXX = emcc
9595
OBJ_SUBDIR_NAME = wobj
9696
EXEC_SUBDIR_NAME = wasm
97-
EXEC_EXT = .html
97+
EXEC_EXT = .js
9898

9999
# Emscripten optimization flags documentation
100100
# - https://emscripten.org/docs/optimizing/Optimizing-Code.html#optimizing-code
101101
# - https://emscripten.org/docs/tools_reference/emcc.html#emcc-compiler-optimization-options
102+
CFLAGS += -Os
102103

103104
# Documentation for various Emscripten flags
104105
# - Full List: https://github.com/emscripten-core/emscripten/blob/main/src/settings.js
105106
# - Modularize: https://emscripten.org/docs/getting_started/FAQ.html#can-i-use-multiple-emscripten-compiled-programs-on-one-web-page
106107
# - Environment: https://emscripten.org/docs/getting_started/FAQ.html#can-i-build-javascript-that-only-runs-on-the-web
107108
# - Single File: https://emscripten.org/docs/compiling/Building-Projects.html?highlight=SINGLE_FILE#emscripten-linker-output-files
108109
CFLAGS_EXEC += --shell-file ./emscripten/webnqc_shell.html -s EXPORT_NAME=createWebNqc -s EXPORTED_RUNTIME_METHODS='["callMain","FS"]' \
109-
-s INVOKE_RUN=false -s MODULARIZE=1 -s ENVIRONMENT=web -s WASM=0
110+
-s INVOKE_RUN=false -s MODULARIZE=1 -s ENVIRONMENT=web -s SINGLE_FILE
110111
else
111112
ifneq (,$(strip $(findstring $(OSTYPE), Darwin)))
112113
# Mac OS X

0 commit comments

Comments
 (0)