summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-02-10 15:08:16 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-02-10 15:13:03 +0100
commit2be62587eecbcad855d2d864af13ea407596ed8b (patch)
tree634713624cd52bdefc3e39f174a31c67c81ccf84 /SConstruct
parentf614f155063e43733c5e4c2572b4ea67b3bcc661 (diff)
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.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 10 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct
index 57fa305a15..78516415c4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -86,13 +86,6 @@ env_base.split_modules = False
env_base.module_version_string = ""
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_flat_dir = methods.android_add_flat_dir
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'):
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']):
env_base.Append(CPPDEFINES=['NO_EDITOR_SPLASH'])