summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/msvc.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-12 17:48:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-12 17:48:12 +0200
commit19712e5025e3cf6a33fccd0738f04e018d55025f (patch)
tree25683461da536e1e7ffee70279780b4f3586142f /engine/SCons/Tool/msvc.py
parentcd2ab5002aa2359575088bbc3183a9a91cc50c31 (diff)
New upstream version 3.0.5upstream/3.0.5
Diffstat (limited to 'engine/SCons/Tool/msvc.py')
-rw-r--r--engine/SCons/Tool/msvc.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/engine/SCons/Tool/msvc.py b/engine/SCons/Tool/msvc.py
index c36b5b2..4649963 100644
--- a/engine/SCons/Tool/msvc.py
+++ b/engine/SCons/Tool/msvc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvc.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/msvc.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan"
import os.path
import re
@@ -112,7 +112,7 @@ def object_emitter(target, source, env, parent_emitter):
#
# See issue #2505 for a discussion of what to do if it turns
# out this assumption causes trouble in the wild:
- # http://scons.tigris.org/issues/show_bug.cgi?id=2505
+ # https://github.com/SCons/scons/issues/2505
if 'PCH' in env:
pch = env['PCH']
if str(target[0]) != SCons.Util.splitext(str(pch))[0] + '.obj':
@@ -195,7 +195,10 @@ def msvc_output_flag(target, source, env, for_signature):
# that the test(s) for this can be run on non-Windows systems
# without having a hard-coded backslash mess up command-line
# argument parsing.
- return '/Fo${TARGET.dir}' + os.sep
+ # Adding double os.sep's as if the TARGET.dir has a space or otherwise
+ # needs to be quoted they are needed per MSVC's odd behavior
+ # See: https://github.com/SCons/scons/issues/3106
+ return '/Fo${TARGET.dir}' + os.sep*2
CAction = SCons.Action.Action("$CCCOM", "$CCCOMSTR",
batch_key=msvc_batch_key,
@@ -259,7 +262,7 @@ def generate(env):
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = 'rc'
- env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCFLAGS'] = SCons.Util.CLVar('/nologo')
env['RCSUFFIXES']=['.rc','.rc2']
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
env['BUILDERS']['RES'] = res_builder
@@ -268,6 +271,10 @@ def generate(env):
env['SHOBJPREFIX'] = '$OBJPREFIX'
env['SHOBJSUFFIX'] = '$OBJSUFFIX'
+ # MSVC probably wont support unistd.h so default
+ # without it for lex generation
+ env["LEXUNISTD"] = SCons.Util.CLVar("--nounistd")
+
# Set-up ms tools paths
msvc_setup_env_once(env)
@@ -286,7 +293,7 @@ def generate(env):
env['ENV']['SystemRoot'] = SCons.Platform.win32.get_system_root()
def exists(env):
- return msvc_exists()
+ return msvc_exists(env)
# Local Variables:
# tab-width:4