SCons: Make MD5-timestamp decider and implicit_cache debug-only

As advised by @bdbaddog in #25403, those options reduce the certainty
that all everything will be rebuilt as it should, so they are not advised
for release builds.
This commit is contained in:
Rémi Verschelde 2019-02-10 15:08:16 +01:00
parent f614f15506
commit 2be62587ee
1 changed files with 10 additions and 7 deletions

View File

@ -86,13 +86,6 @@ env_base.split_modules = False
env_base.module_version_string = "" env_base.module_version_string = ""
env_base.msvc = False env_base.msvc = False
# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
# http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
env_base.Decider('MD5-timestamp')
# Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
# http://scons.org/doc/production/HTML/scons-user/ch06s04.html
env_base.SetOption('implicit_cache', 1)
env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository
env_base.__class__.android_add_flat_dir = methods.android_add_flat_dir env_base.__class__.android_add_flat_dir = methods.android_add_flat_dir
env_base.__class__.android_add_dependency = methods.android_add_dependency env_base.__class__.android_add_dependency = methods.android_add_dependency
@ -233,6 +226,16 @@ env_base.platform_apis = platform_apis
if (env_base['target'] == 'debug'): if (env_base['target'] == 'debug'):
env_base.Append(CPPDEFINES=['DEBUG_MEMORY_ALLOC','DISABLE_FORCED_INLINE']) env_base.Append(CPPDEFINES=['DEBUG_MEMORY_ALLOC','DISABLE_FORCED_INLINE'])
# The two options below speed up incremental builds, but reduce the certainty that all files
# will properly be rebuilt. As such, we only enable them for debug (dev) builds, not release.
# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
# http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
env_base.Decider('MD5-timestamp')
# Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
# http://scons.org/doc/production/HTML/scons-user/ch06s04.html
env_base.SetOption('implicit_cache', 1)
if (env_base['no_editor_splash']): if (env_base['no_editor_splash']):
env_base.Append(CPPDEFINES=['NO_EDITOR_SPLASH']) env_base.Append(CPPDEFINES=['NO_EDITOR_SPLASH'])