summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/mslink.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-05-06 05:58:31 +0000
committerSteven Knight <knight@baldmt.com>2003-05-06 05:58:31 +0000
commitaaf2cbb74e00fdc89da432d18e9fe40bb7de3b9d (patch)
treec399116a6a33ae9ad69d04dd43c2f272737c2074 /src/engine/SCons/Tool/mslink.py
parente591784eb29edfaf2760024f57ee1462f1bae1f3 (diff)
downloadscons-aaf2cbb74e00fdc89da432d18e9fe40bb7de3b9d.tar.gz
Refactor to use real Nodes for command-line attributes and eliminate PathList. (Charles Crain)
Diffstat (limited to 'src/engine/SCons/Tool/mslink.py')
-rw-r--r--src/engine/SCons/Tool/mslink.py59
1 files changed, 26 insertions, 33 deletions
diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py
index 4bf8f0e4..8aa6f09d 100644
--- a/src/engine/SCons/Tool/mslink.py
+++ b/src/engine/SCons/Tool/mslink.py
@@ -44,41 +44,34 @@ import msvc
from SCons.Tool.msvc import get_msdev_paths
-def pdbGenerator(env, target, source):
+def pdbGenerator(env, target, source, for_signature):
if target and env.has_key('PDB') and env['PDB']:
- return ['/PDB:%s'%target[0].File(env['PDB']), '/DEBUG']
-
-def win32ShlinkTargets(target, source, env):
- if target:
- listCmd = []
- dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
- if dll: listCmd.append("/out:%s"%dll)
-
- implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
- if implib: listCmd.append("/implib:%s"%implib)
-
- return listCmd
- else:
- # For signature calculation
- return '/out:$TARGET'
-
-def win32ShlinkSources(target, source, env):
- if target:
- listCmd = []
-
- deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
- for src in source:
- if src == deffile:
- # Treat this source as a .def file.
- listCmd.append("/def:%s" % src)
- else:
- # Just treat it as a generic source file.
- listCmd.append(str(src))
- return listCmd
- else:
- # For signature calculation
- return "$SOURCES"
+ return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
+ '/DEBUG']
+def win32ShlinkTargets(target, source, env, for_signature):
+ listCmd = []
+ dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+ if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
+
+ implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
+ if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
+
+ return listCmd
+
+def win32ShlinkSources(target, source, env, for_signature):
+ listCmd = []
+
+ deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
+ for src in source:
+ if src == deffile:
+ # Treat this source as a .def file.
+ listCmd.append("/def:%s" % src.get_string(for_signature))
+ else:
+ # Just treat it as a generic source file.
+ listCmd.append(src)
+ return listCmd
+
def win32LibEmitter(target, source, env):
msvc.validate_vars(env)