summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/mslink.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-06-21 07:06:09 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-06-21 07:06:09 +0200
commit71c19b5c2d38022afb2a5767a3f8da11d0f06444 (patch)
tree1f2a79dfe0ebe98c6b95d5a0a4f5615d9e4afaab /engine/SCons/Tool/mslink.py
parent3f6052c28746cf9f29443a610ab60f5b02d3b658 (diff)
parentb0f56d74df2a6904ddceb963833d4ea357251853 (diff)
Merge tag 'upstream/2.3.5'
Upstream version 2.3.5
Diffstat (limited to 'engine/SCons/Tool/mslink.py')
-rw-r--r--engine/SCons/Tool/mslink.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/engine/SCons/Tool/mslink.py b/engine/SCons/Tool/mslink.py
index e10662b..764cbe5 100644
--- a/engine/SCons/Tool/mslink.py
+++ b/engine/SCons/Tool/mslink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 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/mslink.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Tool/mslink.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import os.path
@@ -129,6 +129,14 @@ def _dllEmitter(target, source, env, paramtp):
extratargets.append(pdb)
target[0].attributes.pdb = pdb
+ if version_num >= 11.0 and env.get('PCH', 0):
+ # MSVC 11 and above need the PCH object file to be added to the link line,
+ # otherwise you get link error LNK2011.
+ pchobj = SCons.Util.splitext(str(env['PCH']))[0] + '.obj'
+ # print "prog_emitter, version %s, appending pchobj %s"%(version_num, pchobj)
+ if pchobj not in extrasources:
+ extrasources.append(pchobj)
+
if not no_import_lib and \
not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
# Append an import library to the list of targets.
@@ -237,11 +245,11 @@ embedManifestExeCheckAction = SCons.Action.Action(embedManifestExeCheck, None)
regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR")
regServerCheck = SCons.Action.Action(RegServerFunc, None)
-shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}', '$SHLINKCOMSTR')
+shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES", "$SHLINKCOMSTR")}', '$SHLINKCOMSTR')
compositeShLinkAction = shlibLinkAction + regServerCheck + embedManifestDllCheckAction
-ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}', '$LDMODULECOMSTR')
+ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES", "$LDMODULECOMSTR")}', '$LDMODULECOMSTR')
compositeLdmodAction = ldmodLinkAction + regServerCheck + embedManifestDllCheckAction
-exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}', '$LINKCOMSTR')
+exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows", "$LINKCOMSTR")}', '$LINKCOMSTR')
compositeLinkAction = exeLinkAction + embedManifestExeCheckAction
def generate(env):