summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/msvc.py
diff options
context:
space:
mode:
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'