summaryrefslogtreecommitdiffhomepage
path: root/webassembly
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-29 15:23:57 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-29 15:23:57 +0100
commit2992b537413d6f50303f5e146ca2705dbed6f7ce (patch)
tree7a164b9a44d27917fd6600afe41a4dd973e05790 /webassembly
parentb1fb4f3aa1ec29781d2e25b1a05fb70e143fd24d (diff)
WASM size optimized with -Os
Diffstat (limited to 'webassembly')
-rw-r--r--webassembly/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/webassembly/Makefile b/webassembly/Makefile
index 49a5ed3..41d106e 100644
--- a/webassembly/Makefile
+++ b/webassembly/Makefile
@@ -5,8 +5,8 @@ OBJS=diff.o
CXX=em++
-CXXFLAGS=-I./include -O2 -std=c++20
-LDFLAGS=-s WASM=1 -s EXPORTED_FUNCTIONS=_diff_create,_diff_apply,_free
+CXXFLAGS=-I./include -Os -std=c++20
+LDFLAGS=-Os -s WASM=1 -s EXPORTED_FUNCTIONS=_diff_create,_diff_apply,_free
# Note: Instead of the above explicit EXPORTED_FUNCTIONS, the following causes ~7x wasm file size:
#-s LINKABLE=1 -s EXPORT_ALL=1