summaryrefslogtreecommitdiffhomepage
path: root/webassembly
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-31 18:19:40 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-31 18:19:40 +0100
commit1771f788a5b9e844f0a5315faee104648e3b7d88 (patch)
tree6ed215805b1654060ef7ae4ad939fed306b1be58 /webassembly
parent8d1b4f06375bf676c5cf825ba4b116271f3d44c5 (diff)
Fix build of v1.5
Diffstat (limited to 'webassembly')
-rw-r--r--webassembly/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/webassembly/Makefile b/webassembly/Makefile
index 49a5ed3..0487d2a 100644
--- a/webassembly/Makefile
+++ b/webassembly/Makefile
@@ -6,7 +6,7 @@ OBJS=diff.o
CXX=em++
CXXFLAGS=-I./include -O2 -std=c++20
-LDFLAGS=-s WASM=1 -s EXPORTED_FUNCTIONS=_diff_create,_diff_apply,_free
+LDFLAGS=-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
@@ -24,6 +24,8 @@ $(TARGET): $(OBJS)
diff.o: ../diff.cpp
$(CXX) -c $< $(CXXFLAGS) -o $@
+ # run again in case em++ just asked to re-run (on pbuilder/buildd)
+ test -e $@ || $(CXX) -c $< $(CXXFLAGS) -o $@
clean:
-rm -f *.o *.js *.wasm *.html