diff options
author | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2022-06-21 14:08:53 (GMT) |
---|---|---|
committer | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2022-06-21 14:08:53 (GMT) |
commit | ac9b54756cedd01c36bfbf1bca7d59f92fd08f15 (patch) | |
tree | c151f8d7dbf81a5d47d93c7e567d83409beaf3ab /SCons/Tool | |
parent | 5dd220bf7d625771acc7f7ca476275795029b560 (diff) | |
download | SCons-ac9b54756cedd01c36bfbf1bca7d59f92fd08f15.zip SCons-ac9b54756cedd01c36bfbf1bca7d59f92fd08f15.tar.gz SCons-ac9b54756cedd01c36bfbf1bca7d59f92fd08f15.tar.bz2 |
Consider MSVC_TOOLSET_VERSION specification intent to use msvc tools. Update boolean symbols accepted for uwp and spectre.
Diffstat (limited to 'SCons/Tool')
-rw-r--r-- | SCons/Tool/MSCommon/MSVC/ScriptArguments.py | 9 | ||||
-rw-r--r-- | SCons/Tool/MSCommon/vc.py | 16 |
2 files changed, 17 insertions, 8 deletions
diff --git a/SCons/Tool/MSCommon/MSVC/ScriptArguments.py b/SCons/Tool/MSCommon/MSVC/ScriptArguments.py index 8bef3f5..2a94650 100644 --- a/SCons/Tool/MSCommon/MSVC/ScriptArguments.py +++ b/SCons/Tool/MSCommon/MSVC/ScriptArguments.py @@ -58,8 +58,9 @@ if CONFIG_CACHE: if os.environ.get('SCONS_CACHE_MSVC_FORCE_DEFAULTS') in Config.BOOLEAN_SYMBOLS[True]: _SCONS_CACHE_MSVC_FORCE_DEFAULTS = True -# MSVC_UWP_APP argument: boolean True -_UWP_ARGUMENT_BOOLEAN_TRUE = (True, '1') +# Script argument: boolean True +_ARGUMENT_BOOLEAN_TRUE_LEGACY = (True, '1') # MSVC_UWP_APP +_ARGUMENT_BOOLEAN_TRUE = (True,) # TODO: verify SDK 10 version folder names 10.0.XXXXX.0 {1,3} last? re_sdk_version_100 = re.compile(r'^10[.][0-9][.][0-9]{5}[.][0-9]{1}$') @@ -173,7 +174,7 @@ def _msvc_script_argument_uwp(env, msvc, arglist): if not uwp_app: return None - if uwp_app not in _UWP_ARGUMENT_BOOLEAN_TRUE: + if uwp_app not in _ARGUMENT_BOOLEAN_TRUE_LEGACY: return None if msvc.vs_def.vc_buildtools_def.vc_version_numeric < VS2015.vc_buildtools_def.vc_version_numeric: @@ -610,7 +611,7 @@ def _msvc_script_argument_spectre(env, msvc, arglist): if not spectre_libs: return None - if spectre_libs not in (True, '1'): + if spectre_libs not in _ARGUMENT_BOOLEAN_TRUE: return None if msvc.vs_def.vc_buildtools_def.vc_version_numeric < VS2017.vc_buildtools_def.vc_version_numeric: diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py index 2f1ec11..dc97e2f 100644 --- a/SCons/Tool/MSCommon/vc.py +++ b/SCons/Tool/MSCommon/vc.py @@ -1300,12 +1300,20 @@ def msvc_setup_env_user(env=None): if env: # Intent is to use msvc tools: - # MSVC_VERSION or MSVS_VERSION: defined and is True - # MSVC_USE_SCRIPT: defined and (is string or is False) - # MSVC_USE_SETTINGS: defined and is not None + # MSVC_VERSION: defined and evaluates True + # MSVS_VERSION: defined and evaluates True + # MSVC_TOOLSET_VERSION: defined and evaluates True + # MSVC_USE_SCRIPT: defined and (is string or evaluates False) + # MSVC_USE_SETTINGS: defined and is not None + + # Arguments possibly present but not considered: + # MSVC_SDK_VERSION + # MSVC_UWP_APP + # MSVC_SPECTRE_LIBS + # MSVC_SCRIPT_ARGS # defined and is True - for key in ['MSVC_VERSION', 'MSVS_VERSION']: + for key in ['MSVC_VERSION', 'MSVS_VERSION', 'MSVC_TOOLSET_VERSION']: if key in env and env[key]: rval = True debug('key=%s, return=%s', repr(key), rval) |