diff options
author | Steven Knight <knight@baldmt.com> | 2003-02-04 00:32:15 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-02-04 00:32:15 (GMT) |
commit | 15e31b8bda9f093971af3c3b0136b043ebb02746 (patch) | |
tree | a506c2e399b753f6465c1e85d826740e456faeaf | |
parent | dcca819a1858987deb8ea5feba1819f85c447b77 (diff) | |
download | SCons-15e31b8bda9f093971af3c3b0136b043ebb02746.zip SCons-15e31b8bda9f093971af3c3b0136b043ebb02746.tar.gz SCons-15e31b8bda9f093971af3c3b0136b043ebb02746.tar.bz2 |
Fixes for compiling with MSVC when running cygwin Python. (Chad Austin)
-rw-r--r-- | src/CHANGES.txt | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/mslink.py | 12 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvc.py | 9 |
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' |