From 1fcea73d51933e034e313baf29767c7643c1a209 Mon Sep 17 00:00:00 2001 From: "Alon Zakai (kripken)" Date: Mon, 2 Apr 2018 19:40:27 -0700 Subject: [PATCH] build improvements: no need for c++ exceptions or rtti (should decrease size by 15% based on the emscripten test suite), and enable memory growth in wasm where it has almost no overhead --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 83dfc9a..10098dd 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ $(ACTIVE)/Box2D/Rope/b2Rope.bc all: box2d.js box2d.wasm.js %.bc: %.cpp - $(CXX) $(OPTS) -I$(ACTIVE) $< -o $@ + $(CXX) $(OPTS) -I$(ACTIVE) $< -o $@ -fno-exceptions -fno-rtti box2d.bc: $(OBJECTS) $(CXX) $(OPTS) -I$(ACTIVE) -o $@ $(OBJECTS) @@ -98,7 +98,7 @@ box2d.js: box2d.bc box2d_glue.cpp box2d_glue.h $(CXX) $(LINK_OPTS) -I$(ACTIVE) $< -o build/$(ACTIVE)_$(BUILD).js box2d.wasm.js: box2d.bc box2d_glue.cpp box2d_glue.h - $(CXX) $(LINK_OPTS) -I$(ACTIVE) $< -o build/$(ACTIVE)_$(BUILD).wasm.js -s WASM=1 + $(CXX) $(LINK_OPTS) -I$(ACTIVE) $< -o build/$(ACTIVE)_$(BUILD).wasm.js -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 clean: rm -f $(OBJECTS)