summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-10 15:36:55 +0100
committerGitHub <noreply@github.com>2019-02-10 15:36:55 +0100
commit5892b122819091c026f546c1766cdbc06b6e87c8 (patch)
treebd723fa0d2f6dd4dbe67e963acd8d10423deaa7d
parent26a547f7fce022dd5565c95b90c79f412943c90f (diff)
parent2be62587eecbcad855d2d864af13ea407596ed8b (diff)
Merge pull request #25763 from akien-mga/scons-decider
SCons: Make MD5-timestamp decider and implicit_cache debug-only
-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'])