diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-04-24 20:56:06 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-04-24 20:56:06 (GMT) |
commit | a61777f9fb10310e60a400fe2afe553b9878588a (patch) | |
tree | 30461666511ca63d676832a91542955471ea6c26 | |
parent | 3130114195c0c49fc3078174ca1f8a91d6339baa (diff) | |
download | SCons-a61777f9fb10310e60a400fe2afe553b9878588a.zip SCons-a61777f9fb10310e60a400fe2afe553b9878588a.tar.gz SCons-a61777f9fb10310e60a400fe2afe553b9878588a.tar.bz2 |
Fix issue 2628, long compile lines in batch mode. Thanks to Grzegorz Bizo for the patch.
-rw-r--r-- | src/CHANGES.txt | 17 | ||||
-rw-r--r-- | src/RELEASE.txt | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvc.py | 8 | ||||
-rw-r--r-- | test/MSVC/batch-longlines.py | 59 |
4 files changed, 76 insertions, 12 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 97fb063..6c930e6 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,9 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Grzegorz BizoÅ„: + - Fix long compile lines in batch mode by using TEMPFILE + From Justin Gullingsrud: - support -std=c++0x and related CXXFLAGS in pkgconfig (ParseFlags) @@ -80,7 +83,7 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE - Print the path to the SCons package in scons --version - From Jean-Fran�ois Colson: + From Jean-Fran�ois Colson: - Improve Microsoft Visual Studio Solution generation, and fix various errors in the generated solutions especially when using @@ -642,7 +645,7 @@ RELEASE 1.1.0.d20081207 - Sun, 07 Dec 2008 19:17:23 -0800 - Issue 2401: Fix usage of comparisons with None. - From Ludwig H�hne: + From Ludwig H�hne: - Handle Java inner classes declared within a method. @@ -771,7 +774,7 @@ RELEASE 1.1.0 - Thu, 09 Oct 2008 08:33:47 -0700 - Fix VariantDir duplication of #included files in subdirectories. - From Ludwig H�hne: + From Ludwig H�hne: - Reduce memory usage when a directory is used as a dependency of another Node (such as an Alias) by returning a concatenation @@ -886,7 +889,7 @@ RELEASE 1.0.0 - XXX - Clear the Node state when turning a generic Entry into a Dir. - From Ludwig H�hne: + From Ludwig H�hne: - Fix sporadic output-order failures in test/GetBuildFailures/parallel.py. @@ -1120,7 +1123,7 @@ RELEASE 0.98.1 - Fri, 18 Apr 2008 19:11:58 -0700 - Fix the --debug=stree option so it prints its tree once, not twice. - From Johan Boul�: + From Johan Boul�: - Fix the ability to use LoadableModule() under MinGW. @@ -1233,7 +1236,7 @@ RELEASE 0.98 - Sun, 30 Mar 2008 23:33:05 -0700 calls by using a File's .suffix attribute directly instead of stringifying it. - From Jérôme Berger: + From Jérôme Berger: - Have the D language scanner search for .di files as well as .d files. @@ -2334,7 +2337,7 @@ RELEASE 0.96.92 - Mon, 10 Apr 2006 21:08:22 -0400 - Fix C/C++ compiler selection on AIX to not always use the external $CC environment variable. - From August Hörandl: + From August Hörandl: - Add a scanner for \include and \import files, with support for searching a directory list in $TEXINPUTS (imported from the external diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 0832daf..6fde09c 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -56,6 +56,7 @@ FIXES + - Long compile lines no longer break MSVC_BATCH mode - RPATH is now in LINKCOM rather than LINKFLAGS, so resetting LINKFLAGS doesn't kill RPATH - Precompiled headers on Windows no longer break when used with @@ -118,7 +119,8 @@ Thanks to Dirk Baechle, Vincent Beffara, - Jean-François Colson, + Grzegorz BizoÅ„, + Jean-François Colson, Bauke Conijn, Bill Deegan, Ken Deeter, diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py index 066b5e5..36b65ca 100644 --- a/src/engine/SCons/Tool/msvc.py +++ b/src/engine/SCons/Tool/msvc.py @@ -214,17 +214,17 @@ def generate(env): env['CC'] = 'cl' env['CCFLAGS'] = SCons.Util.CLVar('/nologo') env['CFLAGS'] = SCons.Util.CLVar('') - env['CCCOM'] = '$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM' + env['CCCOM'] = '${TEMPFILE("$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM")}' env['SHCC'] = '$CC' env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS') env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS') - env['SHCCCOM'] = '$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM' + env['SHCCCOM'] = '${TEMPFILE("$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM")}' env['CXX'] = '$CC' env['CXXFLAGS'] = SCons.Util.CLVar('$( /TP $)') - env['CXXCOM'] = '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM' + env['CXXCOM'] = '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM")}' env['SHCXX'] = '$CXX' env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS') - env['SHCXXCOM'] = '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM' + env['SHCXXCOM'] = '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM")}' env['CPPDEFPREFIX'] = '/D' env['CPPDEFSUFFIX'] = '' env['INCPREFIX'] = '/I' diff --git a/test/MSVC/batch-longlines.py b/test/MSVC/batch-longlines.py new file mode 100644 index 0000000..96fd39a --- /dev/null +++ b/test/MSVC/batch-longlines.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Verify operation of Visual C/C++ batch builds with long lines.
+
+Only runs on Windows.
+"""
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+_python_ = TestSCons._python_
+
+for i in xrange(1,200):
+ test.write('source-file-with-quite-a-long-name-maybe-unrealistic-but-who-cares-%05d.cxx'%i,
+ '/* source file %d */\nint var%d;\n'%(i,i))
+
+test.write('SConstruct', """
+env = Environment(tools=['msvc', 'mslink'],
+ MSVC_BATCH=ARGUMENTS.get('MSVC_BATCH'))
+env.SharedLibrary('mylib', Glob('source*.cxx'))
+""" % locals())
+
+test.run(arguments = 'MSVC_BATCH=1 .')
+
+test.must_exist('mylib.dll')
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
|