[buil] emscripten toolchain: fix build with emmc version >= 1.39.5

This commit is contained in:
Émilie Feral
2020-01-31 15:37:01 +01:00
committed by Léa Saviot
parent bb2e8ad3c5
commit fdb1417a02

View File

@@ -115,6 +115,15 @@ endif
# Configure EMFLAGS
EMFLAGS += -s WASM=0
# Since emcc 1.39.5, DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is defautly
# to 1 which discards old looks up to find DOM elements. However SDL relies on
# the presence of a target "#canvas" that used to return the Module['canvas']
# target but not anymore. It also expects the existence of Module['canvas'].
# Until we fix the DOM of the html calling epsilon module, we use the deprecated
# 'find_event_target'.
# TODO: fix DOM of htmls files that uses epsilon js module
EMFLAGS += -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0
# Configure LDFLAGS
EMSCRIPTEN_MODULARIZE ?= 1
LDFLAGS += -s MODULARIZE=$(EMSCRIPTEN_MODULARIZE) -s 'EXPORT_NAME="Epsilon"'