scons: Workaround failures with MSVC when using SCons 3.0.[2-4].
authorJose Fonseca <jfonseca@vmware.com>
Thu, 28 Feb 2019 09:53:28 +0000 (09:53 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Thu, 28 Feb 2019 21:26:15 +0000 (21:26 +0000)
This change applies the workaround suggested by Bill Deegan on the
affected SCons versions.

It also adds a comment with the URL explaining why we were using
customizing the decider and max_drift in the first place, as I had
forgotten all about it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109443
Tested-by: liviuprodea@yahoo.com
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
scons/gallium.py

index 963834a5fbc12a378ad459b1d1269fa2236969d2..efe32e06c6c99fcb8d52d8847e92c99c5282c6ad 100755 (executable)
@@ -308,7 +308,13 @@ def generate(env):
     if env.GetOption('num_jobs') <= 1:
         env.SetOption('num_jobs', num_jobs())
 
-    env.Decider('MD5-timestamp')
+    # Speed up dependency checking.  See
+    # - https://github.com/SCons/scons/wiki/GoFastButton
+    # - https://bugs.freedesktop.org/show_bug.cgi?id=109443
+    scons_version = distutils.version.StrictVersion(SCons.__version__)
+    if scons_version < distutils.version.StrictVersion('3.0.2') or \
+       scons_version > distutils.version.StrictVersion('3.0.4'):
+        env.Decider('MD5-timestamp')
     env.SetOption('max_drift', 60)
 
     # C preprocessor options