fix compatibility with newer versions of emscripten
This commit is contained in:
parent
f52d179c18
commit
ed94b56d16
6 changed files with 11 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -31,7 +31,7 @@ JS_ASMJS_TARGET := javascript/olm_legacy.js
|
||||||
WASM_TARGET := $(BUILD_DIR)/wasm/libolm.a
|
WASM_TARGET := $(BUILD_DIR)/wasm/libolm.a
|
||||||
|
|
||||||
JS_EXPORTED_FUNCTIONS := javascript/exported_functions.json
|
JS_EXPORTED_FUNCTIONS := javascript/exported_functions.json
|
||||||
JS_EXPORTED_RUNTIME_METHODS := [ALLOC_STACK]
|
JS_EXPORTED_RUNTIME_METHODS := [ALLOC_STACK,writeAsciiToMemory,intArrayFromString]
|
||||||
JS_EXTERNS := javascript/externs.js
|
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 include/olm/sas.h include/olm/error.h include/olm/olm_export.h
|
PUBLIC_HEADERS := include/olm/olm.h include/olm/outbound_group_session.h include/olm/inbound_group_session.h include/olm/pk.h include/olm/sas.h include/olm/error.h include/olm/olm_export.h
|
||||||
|
@ -106,7 +106,7 @@ EMCCFLAGS = --closure 1 --memory-init-file 0 -s NO_FILESYSTEM=1 -s INVOKE_RUN=0
|
||||||
# we don't use this for the legacy build.)
|
# we don't use this for the legacy build.)
|
||||||
EMCCFLAGS_WASM += -s TOTAL_STACK=65536 -s TOTAL_MEMORY=262144 -s ALLOW_MEMORY_GROWTH
|
EMCCFLAGS_WASM += -s TOTAL_STACK=65536 -s TOTAL_MEMORY=262144 -s ALLOW_MEMORY_GROWTH
|
||||||
|
|
||||||
EMCCFLAGS_ASMJS += -s WASM=0
|
EMCCFLAGS_ASMJS += -s WASM=0 -Wno-error=closure
|
||||||
|
|
||||||
EMCC.c = $(EMCC) $(CFLAGS) $(CPPFLAGS) -c -DNDEBUG -DOLM_STATIC_DEFINE=1
|
EMCC.c = $(EMCC) $(CFLAGS) $(CPPFLAGS) -c -DNDEBUG -DOLM_STATIC_DEFINE=1
|
||||||
EMCC.cc = $(EMCC) $(CXXFLAGS) $(CPPFLAGS) -c -DNDEBUG -DOLM_STATIC_DEFINE=1
|
EMCC.cc = $(EMCC) $(CXXFLAGS) $(CPPFLAGS) -c -DNDEBUG -DOLM_STATIC_DEFINE=1
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @constructor */
|
||||||
function InboundGroupSession() {
|
function InboundGroupSession() {
|
||||||
var size = Module['_olm_inbound_group_session_size']();
|
var size = Module['_olm_inbound_group_session_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @constructor */
|
||||||
function OutboundGroupSession() {
|
function OutboundGroupSession() {
|
||||||
var size = Module['_olm_outbound_group_session_size']();
|
var size = Module['_olm_outbound_group_session_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @constructor */
|
||||||
function PkEncryption() {
|
function PkEncryption() {
|
||||||
var size = Module['_olm_pk_encryption_size']();
|
var size = Module['_olm_pk_encryption_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
@ -98,6 +99,7 @@ PkEncryption.prototype['encrypt'] = restore_stack(function(
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/** @constructor */
|
||||||
function PkDecryption() {
|
function PkDecryption() {
|
||||||
var size = Module['_olm_pk_decryption_size']();
|
var size = Module['_olm_pk_decryption_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
@ -273,6 +275,7 @@ PkDecryption.prototype['decrypt'] = restore_stack(function (
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
/** @constructor */
|
||||||
function PkSigning() {
|
function PkSigning() {
|
||||||
var size = Module['_olm_pk_signing_size']();
|
var size = Module['_olm_pk_signing_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
|
|
@ -44,6 +44,7 @@ function bzero(ptr, n) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @constructor */
|
||||||
function Account() {
|
function Account() {
|
||||||
var size = Module['_olm_account_size']();
|
var size = Module['_olm_account_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
@ -244,6 +245,7 @@ Account.prototype['unpickle'] = restore_stack(function(key, pickle) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** @constructor */
|
||||||
function Session() {
|
function Session() {
|
||||||
var size = Module['_olm_session_size']();
|
var size = Module['_olm_session_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
@ -530,6 +532,7 @@ Session.prototype['describe'] = restore_stack(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** @constructor */
|
||||||
function Utility() {
|
function Utility() {
|
||||||
var size = Module['_olm_utility_size']();
|
var size = Module['_olm_utility_size']();
|
||||||
this.buf = malloc(size);
|
this.buf = malloc(size);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @constructor */
|
||||||
function SAS() {
|
function SAS() {
|
||||||
var size = Module['_olm_sas_size']();
|
var size = Module['_olm_sas_size']();
|
||||||
var random_length = Module['_olm_create_sas_random_length']();
|
var random_length = Module['_olm_create_sas_random_length']();
|
||||||
|
|
Loading…
Reference in a new issue