summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2016-09-05 16:01:44 -0400
committerAndrew Morrow <acm@mongodb.com>2016-10-21 13:50:22 -0400
commit53cd93fb9b31b3fe0bfa1fc12d64d9caf7b7f662 (patch)
treea8976028a2e25e6d168018f410ed4bd20aa24f19 /SConstruct
parentf6e1dfb14413f4de88d236b50047c3b69ad5473c (diff)
downloadmongo-53cd93fb9b31b3fe0bfa1fc12d64d9caf7b7f662.tar.gz
SERVER-26473 Implement the git based decider
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct16
1 files changed, 16 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 33ced31445a..fcac915d43e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -497,6 +497,15 @@ add_option('use-s390x-crc32',
type='choice',
)
+add_option('git-decider',
+ choices=["on", "off"],
+ const='on',
+ default="off",
+ help="Use git metadata for out-of-date detection for source files",
+ nargs='?',
+ type="choice",
+)
+
try:
with open("version.json", "r") as version_fp:
version_data = json.load(version_fp)
@@ -1300,6 +1309,13 @@ if get_option('build-fast-and-loose') == 'on' or \
env.Decider('MD5-timestamp')
env.SetOption('max_drift', 1)
+# If the user has requested the git decider, enable it if it is available. We want to do this after
+# we set the basic decider above, so that we 'chain' to that one.
+if get_option('git-decider') == 'on':
+ git_decider = Tool('git_decider')
+ if git_decider.exists(env):
+ git_decider(env)
+
# On non-windows platforms, we may need to differentiate between flags being used to target an
# executable (like -fPIE), vs those being used to target a (shared) library (like -fPIC). To do so,
# we inject a new family of SCons variables PROG*FLAGS, by reaching into the various COMs.