Skip to content

Commit 7a209e7

Browse files
authored
Pass -sSTRICT when building ports and system libraries. NFC (#17480)
1 parent 6cbbdc7 commit 7a209e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tools/ports/cocos2d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def get(ports, settings, shared):
2323
'cocos2d', 'https://github.com/emscripten-ports/Cocos2d/archive/' + TAG + '.zip', 'Cocos2d-' + TAG, sha512hash=HASH)
2424

2525
def create(final):
26-
logging.info('building port: cocos2d v3')
2726
logging.warn('cocos2d: library is experimental, do not expect that it will work out of the box')
2827

2928
cocos2d_src = os.path.join(ports.get_dir(), 'cocos2d')
@@ -51,6 +50,9 @@ def create(final):
5150
'-DCC_KEYBOARD_SUPPORT',
5251
'-DGL_ES=1',
5352
'-DNDEBUG', # '-DCOCOS2D_DEBUG=1' 1 - error/warn, 2 - verbose
53+
# Cocos2d source code hasn't switched to __EMSCRIPTEN__.
54+
# See https://github.com/emscripten-ports/Cocos2d/pull/3
55+
'-DEMSCRIPTEN',
5456
'-DCP_USE_DOUBLES=0',
5557
'-O2',
5658
'-sUSE_ZLIB=1',

tools/system_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def glob_in_path(path, glob_pattern, excludes=()):
4343
def get_base_cflags(force_object_files=False):
4444
# Always build system libraries with debug information. Non-debug builds
4545
# will ignore this at link time because we link with `-strip-debug`.
46-
flags = ['-g']
46+
flags = ['-g', '-sSTRICT']
4747
if settings.LTO and not force_object_files:
4848
flags += ['-flto=' + settings.LTO]
4949
if settings.RELOCATABLE:

0 commit comments

Comments
 (0)