diff --git a/tools/ports/cocos2d.py b/tools/ports/cocos2d.py index 47814fc62b6a6..eef83bec5fbcd 100644 --- a/tools/ports/cocos2d.py +++ b/tools/ports/cocos2d.py @@ -23,7 +23,6 @@ def get(ports, settings, shared): 'cocos2d', 'https://github.com/emscripten-ports/Cocos2d/archive/' + TAG + '.zip', 'Cocos2d-' + TAG, sha512hash=HASH) def create(final): - logging.info('building port: cocos2d v3') logging.warn('cocos2d: library is experimental, do not expect that it will work out of the box') cocos2d_src = os.path.join(ports.get_dir(), 'cocos2d') @@ -51,6 +50,9 @@ def create(final): '-DCC_KEYBOARD_SUPPORT', '-DGL_ES=1', '-DNDEBUG', # '-DCOCOS2D_DEBUG=1' 1 - error/warn, 2 - verbose + # Cocos2d source code hasn't switched to __EMSCRIPTEN__. + # See https://github.com/emscripten-ports/Cocos2d/pull/3 + '-DEMSCRIPTEN', '-DCP_USE_DOUBLES=0', '-O2', '-sUSE_ZLIB=1', diff --git a/tools/system_libs.py b/tools/system_libs.py index cee7d93be74f7..43e9f322c942d 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -43,7 +43,7 @@ def glob_in_path(path, glob_pattern, excludes=()): def get_base_cflags(force_object_files=False): # Always build system libraries with debug information. Non-debug builds # will ignore this at link time because we link with `-strip-debug`. - flags = ['-g'] + flags = ['-g', '-sSTRICT'] if settings.LTO and not force_object_files: flags += ['-flto=' + settings.LTO] if settings.RELOCATABLE: