Commit 5e87db61 authored by David Baker's avatar David Baker
Browse files

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.
parent 122867c4
......@@ -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)" \
......
var OLM_OPTIONS;
......@@ -21,10 +21,8 @@ if (typeof(window) !== 'undefined') {
}
/* applications should define OLM_OPTIONS in the environment to override
* emscripten module settings (we still need to (re) declare the variable
* otherwise the closure compiler becomes sad).
* emscripten module settings
*/
var OLM_OPTIONS;
if (typeof(OLM_OPTIONS) !== 'undefined') {
for (var olm_option_key in OLM_OPTIONS) {
if (OLM_OPTIONS.hasOwnProperty(olm_option_key)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment