summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/msvc.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-10 12:32:21 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-10 12:32:21 (GMT)
commita2ca9333b07ac0c2509ebe8266d76d6a2fc95663 (patch)
treee7acc6be78dfb24b15dc8bd642d620059c801e51 /src/engine/SCons/Tool/msvc.py
parent7e8d06e0299badbe0efcaa7b976e46a790758b93 (diff)
downloadSCons-a2ca9333b07ac0c2509ebe8266d76d6a2fc95663.zip
SCons-a2ca9333b07ac0c2509ebe8266d76d6a2fc95663.tar.gz
SCons-a2ca9333b07ac0c2509ebe8266d76d6a2fc95663.tar.bz2
Make the static/shared object check work even if the object was already created.
Diffstat (limited to 'src/engine/SCons/Tool/msvc.py')
-rw-r--r--src/engine/SCons/Tool/msvc.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index b9ce9bc..fac178c 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/engine/SCons/Tool/msvc.py
@@ -354,11 +354,13 @@ def pch_emitter(target, source, env):
return (target, source)
-def object_emitter(target, source, env):
+def object_emitter(target, source, env, parent_emitter):
"""Sets up the PDB and PCH dependencies for an object file."""
validate_vars(env)
+ parent_emitter(target, source, env)
+
if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target)
env.Precious(env['PDB'])
@@ -368,6 +370,14 @@ def object_emitter(target, source, env):
return (target, source)
+def static_object_emitter(target, source, env):
+ return object_emitter(target, source, env,
+ SCons.Defaults.StaticObjectEmitter)
+
+def shared_object_emitter(target, source, env):
+ return object_emitter(target, source, env,
+ SCons.Defaults.SharedObjectEmitter)
+
pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
@@ -402,7 +412,8 @@ def generate(env):
env['CPPDEFSUFFIX'] = ''
env['INCPREFIX'] = '/I'
env['INCSUFFIX'] = ''
- env['OBJEMITTER'] = object_emitter
+ env['OBJEMITTER'] = static_object_emitter
+ env['SHOBJEMITTER'] = shared_object_emitter
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = 'rc'