Skip to content

Commit 952afbd

Browse files
committed
make: also specify optimisation level for linking
With emscripten, LLVM is translated to JS during linking and the optimisation level also has an effect here. This was a regression from 9b1fc2e and apart from performance also brings the total size of the distributed files back down to ~7MiB from ~19MiB after the options were split.
1 parent cd42465 commit 952afbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
BASE_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
55
DIST_DIR:=$(BASE_DIR)dist/libraries
66

7-
export LDFLAGS = -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1
7+
export LDFLAGS = -O3 -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1
88
export CFLAGS = -O3 -s USE_PTHREADS=0
99
export CXXFLAGS = $(CFLAGS)
1010
export PKG_CONFIG_PATH = $(DIST_DIR)/lib/pkgconfig

0 commit comments

Comments
 (0)