aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-09-21 16:35:17 +0100
committerDavid Baker <dave@matrix.org>2018-09-21 16:35:17 +0100
commit5e87db615a5e430627b17da5dfbd52f0ef7f4db9 (patch)
tree5e3c0798a6606b56b1fc75cc836c3380ac519d2e /Makefile
parent122867c45c7f41b82a550a9665d34b7dda1c3ffa (diff)
Make OLM_OPTIONS work again
The closure compiler was just renaming the variable so it never would have picked them up. Make it an extern so it knows what to do.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f6c2ab4..dcd5cc1 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@ JS_TARGET := javascript/olm.js
JS_EXPORTED_FUNCTIONS := javascript/exported_functions.json
JS_EXTRA_EXPORTED_RUNTIME_METHODS := ALLOC_STACK
+JS_EXTERNS := javascript/externs.js
PUBLIC_HEADERS := include/olm/olm.h include/olm/outbound_group_session.h include/olm/inbound_group_session.h include/olm/pk.h
@@ -147,7 +148,7 @@ js: $(JS_TARGET)
.PHONY: js
$(JS_TARGET): $(JS_OBJECTS) $(JS_PRE) $(JS_POST) $(JS_EXPORTED_FUNCTIONS)
- $(EMCC_LINK) \
+ EMCC_CLOSURE_ARGS="--externs $(JS_EXTERNS)" $(EMCC_LINK) \
$(foreach f,$(JS_PRE),--pre-js $(f)) \
$(foreach f,$(JS_POST),--post-js $(f)) \
-s "EXPORTED_FUNCTIONS=@$(JS_EXPORTED_FUNCTIONS)" \