Merge pull request #18893 from eska014/html5-reldeb-Os

Build HTML5 release_debug with -Os
This commit is contained in:
Rémi Verschelde 2018-05-16 22:50:45 +02:00 committed by GitHub
commit 82042bdd03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 15 deletions

View File

@ -30,8 +30,8 @@ zip_files = env.InstallAs([
zip_dir.File('godot.wasm'),
zip_dir.File('godot.html')
], [
js_wrapped,
wasm,
'#misc/dist/html/default.html'
js_wrapped,
wasm,
'#misc/dist/html/default.html'
])
env.Zip('#bin/godot', zip_files, ZIPROOT=zip_dir, ZIPSUFFIX='${PROGSUFFIX}${ZIPSUFFIX}', ZIPCOMSTR='Archving $SOURCES as $TARGET')

View File

@ -1,5 +1,4 @@
import os
import string
import sys
@ -39,7 +38,7 @@ def configure(env):
## Build type
if env['target'] == 'release' or env['target'] == 'profile':
if env['target'] != 'debug':
# Use -Os to prioritize optimizing for reduced file size. This is
# particularly valuable for the web platform because it directly
# decreases download time.
@ -48,17 +47,11 @@ def configure(env):
# run-time performance.
env.Append(CCFLAGS=['-Os'])
env.Append(LINKFLAGS=['-Os'])
if env['target'] == 'profile':
if env['target'] == 'release_debug':
env.Append(CPPDEFINES=['DEBUG_ENABLED'])
# Retain function names for backtraces at the cost of file size.
env.Append(LINKFLAGS=['--profiling-funcs'])
elif env['target'] == 'release_debug':
env.Append(CPPDEFINES=['DEBUG_ENABLED'])
env.Append(CCFLAGS=['-O2'])
env.Append(LINKFLAGS=['-O2'])
# Retain function names for backtraces at the cost of file size.
env.Append(LINKFLAGS=['--profiling-funcs'])
elif env['target'] == 'debug':
else:
env.Append(CPPDEFINES=['DEBUG_ENABLED'])
env.Append(CCFLAGS=['-O1', '-g'])
env.Append(LINKFLAGS=['-O1', '-g'])