diff options
author | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2022-06-22 20:53:53 (GMT) |
---|---|---|
committer | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2022-06-22 20:53:53 (GMT) |
commit | 98cf01fd1434463a7af5b3fe5375a9772882dcd2 (patch) | |
tree | 18b2bdbde02fcf4f8d7edd38cbf5ad2d1f7516ff /SCons/Tool | |
parent | 7683a2f958287ceee257b0449eed767b0dd275e5 (diff) | |
download | SCons-98cf01fd1434463a7af5b3fe5375a9772882dcd2.zip SCons-98cf01fd1434463a7af5b3fe5375a9772882dcd2.tar.gz SCons-98cf01fd1434463a7af5b3fe5375a9772882dcd2.tar.bz2 |
Reorder function declarations
Diffstat (limited to 'SCons/Tool')
-rw-r--r-- | SCons/Tool/MSCommon/MSVC/ScriptArguments.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/SCons/Tool/MSCommon/MSVC/ScriptArguments.py b/SCons/Tool/MSCommon/MSVC/ScriptArguments.py index aa96946..e56dd4a 100644 --- a/SCons/Tool/MSCommon/MSVC/ScriptArguments.py +++ b/SCons/Tool/MSCommon/MSVC/ScriptArguments.py @@ -629,6 +629,29 @@ def _msvc_script_argument_spectre(env, msvc, arglist): return spectre_arg +def _user_script_argument_spectre(env, spectre, user_argstr): + + matches = [m for m in re_vcvars_spectre.finditer(user_argstr)] + if not matches: + return None + + if len(matches) > 1: + debug('multiple spectre declarations: MSVC_SCRIPT_ARGS=%s', repr(user_argstr)) + err_msg = "multiple spectre declarations: MSVC_SCRIPT_ARGS={}".format(repr(user_argstr)) + raise MSVCArgumentError(err_msg) + + if not spectre: + return None + + env_argstr = env.get('MSVC_SPECTRE_LIBS','') + debug('multiple spectre declarations: MSVC_SPECTRE_LIBS=%s, MSVC_SCRIPT_ARGS=%s', repr(env_argstr), repr(user_argstr)) + + err_msg = "multiple spectre declarations: MSVC_SPECTRE_LIBS={} and MSVC_SCRIPT_ARGS={}".format( + repr(env_argstr), repr(user_argstr) + ) + + raise MSVCArgumentError(err_msg) + def _msvc_script_argument_user(env, msvc, arglist): # subst None -> empty string @@ -655,29 +678,6 @@ def _msvc_script_argument_user(env, msvc, arglist): return script_args -def _user_script_argument_spectre(env, spectre, user_argstr): - - matches = [m for m in re_vcvars_spectre.finditer(user_argstr)] - if not matches: - return None - - if len(matches) > 1: - debug('multiple spectre declarations: MSVC_SCRIPT_ARGS=%s', repr(user_argstr)) - err_msg = "multiple spectre declarations: MSVC_SCRIPT_ARGS={}".format(repr(user_argstr)) - raise MSVCArgumentError(err_msg) - - if not spectre: - return None - - env_argstr = env.get('MSVC_SPECTRE_LIBS','') - debug('multiple spectre declarations: MSVC_SPECTRE_LIBS=%s, MSVC_SCRIPT_ARGS=%s', repr(env_argstr), repr(user_argstr)) - - err_msg = "multiple spectre declarations: MSVC_SPECTRE_LIBS={} and MSVC_SCRIPT_ARGS={}".format( - repr(env_argstr), repr(user_argstr) - ) - - raise MSVCArgumentError(err_msg) - def msvc_script_arguments(env, version, vc_dir, arg): arglist = [] |