summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Tool/mslink.py12
-rw-r--r--src/engine/SCons/Tool/msvc.py9
3 files changed, 15 insertions, 8 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index b258199..0dea107 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -14,6 +14,8 @@ RELEASE 0.11 - XXX
- Add support for IRIX and the SGI MIPSPro tool chain.
+ - Support using the MSVC tool chain when running Cygwin Python.
+
From Charles Crain:
- Added new AddPreAction() and AddPostAction() functions that support
diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py
index 2ff0838..6ef1542 100644
--- a/src/engine/SCons/Tool/mslink.py
+++ b/src/engine/SCons/Tool/mslink.py
@@ -134,7 +134,10 @@ def generate(env, platform):
env['SHLIBEMITTER']= win32LibEmitter
env['LINK'] = 'link'
env['LINKFLAGS'] = '/nologo'
- env['LINKCOM'] = LinkAction
+ if str(platform) == 'cygwin':
+ env['LINKCOM'] = '$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $SOURCES'
+ else:
+ env['LINKCOM'] = LinkAction
env['PROGEMITTER'] = prog_emitter
env['LIBDIRPREFIX']='/LIBPATH:'
env['LIBDIRSUFFIX']=''
@@ -145,9 +148,10 @@ def generate(env, platform):
env['WIN32DEFSUFFIX'] = '.def'
env['WIN32_INSERT_DEF'] = 0
- include_path, lib_path, exe_path = get_msdev_paths()
- env['ENV']['LIB'] = lib_path
- env['ENV']['PATH'] = exe_path
+ if SCons.Util.can_read_reg:
+ include_path, lib_path, exe_path = get_msdev_paths()
+ env['ENV']['LIB'] = lib_path
+ env['ENV']['PATH'] = exe_path
def exists(env):
return env.Detect('link')
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index 3bae021..70d43ad 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/engine/SCons/Tool/msvc.py
@@ -279,10 +279,11 @@ def generate(env, platform):
if CScan:
CScan.add_skey('.rc')
env['BUILDERS']['RES'] = res_builder
-
- include_path, lib_path, exe_path = get_msdev_paths()
- env['ENV']['INCLUDE'] = include_path
- env['ENV']['PATH'] = exe_path
+
+ if SCons.Util.can_read_reg:
+ include_path, lib_path, exe_path = get_msdev_paths()
+ env['ENV']['INCLUDE'] = include_path
+ env['ENV']['PATH'] = exe_path
env['CFILESUFFIX'] = '.c'
env['CXXFILESUFFIX'] = '.cc'