scons: Fix force_scons parsing.
authorJose Fonseca <jfonseca@vmware.com>
Fri, 25 Oct 2019 21:09:34 +0000 (22:09 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Sat, 26 Oct 2019 07:23:48 +0000 (08:23 +0100)
- Use parsed options instead of using ARGUMENTS directly.
- Handle the case of mingw cross compilation.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2003
SConstruct

index 61a915f7debbc075e02fc2c14aefd1b430f87e94..f905189dd9e518624bc1b4d7f1092bfe6f0728d0 100644 (file)
@@ -71,9 +71,8 @@ Help(opts.GenerateHelpText(env))
 #######################################################################
 # Print a deprecation warning for using scons on non-windows
 
-if common.host_platform != 'windows':
-    force = ARGUMENTS['force_scons']
-    if force.lower() not in {'false', 'off', 'none', '0', 'n'}:
+if common.host_platform != 'windows' and env['platform'] != 'windows':
+    if env['force_scons']:
         print("WARNING: Scons is deprecated for non-windows platforms (including cygwin) "
               "please use meson instead.", file=sys.stderr)
     else: