Skip to content

Commit c4eb118

Browse files
committed
Revise Emscripten optimizations
1 parent 650004d commit c4eb118

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ifneq (,$(strip $(findstring $(TARGETTYPE), WebAssembly)))
106106
# - Modularize: https://emscripten.org/docs/getting_started/FAQ.html#can-i-use-multiple-emscripten-compiled-programs-on-one-web-page
107107
# - Environment: https://emscripten.org/docs/getting_started/FAQ.html#can-i-build-javascript-that-only-runs-on-the-web
108108
# - Single File: https://emscripten.org/docs/compiling/Building-Projects.html?highlight=SINGLE_FILE#emscripten-linker-output-files
109-
CFLAGS_EXEC += --shell-file ./emscripten/webnqc_shell.html -s EXPORT_NAME=createWebNqc -s EXPORTED_RUNTIME_METHODS='["callMain","FS"]' \
109+
CFLAGS_EXEC += -Os --shell-file ./emscripten/webnqc_shell.html -s EXPORT_NAME=createWebNqc -s EXPORTED_RUNTIME_METHODS='["callMain","FS"]' \
110110
-s INVOKE_RUN=false -s MODULARIZE=1 -s ENVIRONMENT=web -s WASM=0
111111
else
112112
ifneq (,$(strip $(findstring $(OSTYPE), Darwin)))
@@ -209,7 +209,7 @@ exec: info $(EXEC_DIR)/nqc$(EXEC_EXT)
209209

210210
$(EXEC_DIR)/nqc$(EXEC_EXT): compiler/parse.cpp $(OBJ)
211211
$(MKDIR) $(dir $@)
212-
$(CXX) -o $@ $(CFLAGS) $(CFLAGS_EXEC) $(OBJ) $(LIBS)
212+
$(CXX) -o $@ $(CFLAGS_EXEC) $(OBJ) $(LIBS)
213213

214214
#
215215
# Emscripten build for WebAssembly

0 commit comments

Comments
 (0)