From 504ffda8d711b2747bf7efbbc13ca8e427eab6d1 Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Mon, 14 May 2018 15:07:29 +0200 Subject: Small refactoring in HTML5 build scripts Drop logic for non-existent 'profile' target --- platform/javascript/SCsub | 6 +++--- platform/javascript/detect.py | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub index 5991075e29..98988d97fd 100644 --- a/platform/javascript/SCsub +++ b/platform/javascript/SCsub @@ -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') diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index a48cb872ee..0c3c09b652 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -1,5 +1,4 @@ import os -import string import sys @@ -48,8 +47,6 @@ def configure(env): # run-time performance. env.Append(CCFLAGS=['-Os']) env.Append(LINKFLAGS=['-Os']) - if env['target'] == 'profile': - env.Append(LINKFLAGS=['--profiling-funcs']) elif env['target'] == 'release_debug': env.Append(CPPDEFINES=['DEBUG_ENABLED']) -- cgit v1.2.3 From 975c0516a4e0bf9d27888b859c1b5185a5788f32 Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Mon, 14 May 2018 15:11:42 +0200 Subject: Build HTML5 release_debug with -Os, like release. The increased build time is negligible in comparison to the decreased file size. --- platform/javascript/detect.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 0c3c09b652..fc909f6619 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -38,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. @@ -47,15 +47,11 @@ def configure(env): # run-time performance. env.Append(CCFLAGS=['-Os']) env.Append(LINKFLAGS=['-Os']) - - 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': + 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']) + else: env.Append(CPPDEFINES=['DEBUG_ENABLED']) env.Append(CCFLAGS=['-O1', '-g']) env.Append(LINKFLAGS=['-O1', '-g']) -- cgit v1.2.3