diff options
author | Alexandre Feblot <devnull@localhost> | 2015-04-29 21:07:09 (GMT) |
---|---|---|
committer | Alexandre Feblot <devnull@localhost> | 2015-04-29 21:07:09 (GMT) |
commit | 24244d6a075c2158c7ccb19fdb15b94c338eea17 (patch) | |
tree | 8cfc1855c9e9022614d89e8aea70895b90b4669e /src | |
parent | 442d6edefdd962f282549b933e2c8323e0809044 (diff) | |
parent | d91c07560606203f3fba4384b2c94c2e4e39d434 (diff) | |
download | SCons-24244d6a075c2158c7ccb19fdb15b94c338eea17.zip SCons-24244d6a075c2158c7ccb19fdb15b94c338eea17.tar.gz SCons-24244d6a075c2158c7ccb19fdb15b94c338eea17.tar.bz2 |
merge default
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Tool/mslink.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py index 37af34e..827161e 100644 --- a/src/engine/SCons/Tool/mslink.py +++ b/src/engine/SCons/Tool/mslink.py @@ -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. |