Fixes for compiling with MSVC when running cygwin Python. (Chad Austin)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 4 Feb 2003 00:32:15 +0000 (00:32 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 4 Feb 2003 00:32:15 +0000 (00:32 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@572 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Tool/mslink.py
src/engine/SCons/Tool/msvc.py

index b258199532dcb3e4ac197375bd00496e66ddca7b..0dea107e80393f3b9f0b242b0c198b0e542160b5 100644 (file)
@@ -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
index 2ff0838ca4ee8d51e50b17cd94107a941597a77a..6ef154234675e1f90b8907e3092c7bc308f4c03d 100644 (file)
@@ -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')
index 3bae021b04c369c4cfa46fcdbbaa48bc6337d96d..70d43ade16dcf5dc17a729bd882c7c8a82fd1dd2 100644 (file)
@@ -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'