[Scons-dev] TempFileMunge does not use env['CXXCOMSTR'] for output display.

Laurent Marchelli laurent.marchelli at gmail.com
Tue Dec 2 07:20:56 EST 2014


Hello,

Please find attached all information needed to evaluate the PR
* It is a very simple hack, the fix is less than 10 lines long, however it
also modifies 5 tools files.
* CXXCOMSTR is for the sample, the fix applies on all command calling
TempFileMunge constructor.
(Except in linkloc.py line 77, where I could not guess which xxxCOMSTR
should be called.)
* Unary tests provided.
* Complete test log attached in mail sent to dev-list
* Tested successfully on our build environment to generate our programs.

Failed the following 3 tests:

* test\Interactive\configure.py
* test\import.py
* test\site_scons\override.py

# 1. Description : #

When the command line exceed the limit 'MAXLINELENGTH' and env['CXXCOMSTR']
is define :

* TempFileMunge does not use the env['CXXCOMSTR'] definition.
* TempFileMunge print the complete command line.

# 2. How to reproduce the bug :#

**SConstruct :**

```
#!python
env = Environment()
AddOption('--bug', action='store_true', dest='bug', default=False)

env['CXXCOMSTR'] = "[CXX] $TARGET"
env['CPPPATH'] = "C:\\Program Files (x86)\\GnuWin32\\include;"
env['LIBPATH'] = "C:\\Program Files (x86)\\GnuWin32\\lib;"

if GetOption('bug') :
    env['MAXLINELENGTH'] = len(env['LIBPATH'])-1

env.Program("scons-test.cpp")
```

# 3. REFERENCE : without --bug option #

```
#!bash
set MYSCONS=C:\dev\scons\scons-trunk\src
set SCONS_LIB_DIR=C:\dev\scons\scons-trunk\src\engine
python C:\dev\scons\scons-trunk\src\script\scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[CXX] scons-test.obj
scons-test.cpp
link /nologo /OUT:scons-test.exe "/LIBPATH:C:\Program Files
(x86)\GnuWin32\lib" scons-test.obj
scons: done building targets.
```

# 4. BEFORE FIX : --bug option #

```
#!bash
set MYSCONS=C:\dev\scons\scons-trunk\src
set SCONS_LIB_DIR=C:\dev\scons\scons-trunk\src\engine
python C:\dev\scons\scons-trunk\src\script\scons.py --bug
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[CXX] scons-test.obj
Using tempfile c:\users\lmarchel\appdata\local\temp\tmpataduf.lnk for
command line:
cl /Foscons-test.obj /c scons-test.cpp /TP /nologo "/IC:\Program Files
(x86)\GnuWin32\include"
scons-test.cpp
Using tempfile c:\users\lmarchel\appdata\local\temp\tmps1g3s7.lnk for
command line:
link /nologo /OUT:scons-test.exe "/LIBPATH:C:\Program Files
(x86)\GnuWin32\lib" scons-test.obj
link @c:\users\lmarchel\appdata\local\temp\tmps1g3s7.lnk
scons: done building targets.
```

# 5. AFTER FIX : --bug option : #

```
#!bash
set MYSCONS=C:\dev\scons\scons-lmarchel\src
set SCONS_LIB_DIR=C:\dev\scons\scons-lmarchel\src\engine
python C:\dev\scons\scons-lmarchel\src\script\scons.py --bug
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[CXX] scons-test.obj
scons-test.cpp
Using tempfile c:\users\lmarchel\appdata\local\temp\tmpasoynv.lnk for
command line:
link /nologo /OUT:scons-test.exe "/LIBPATH:C:\Program Files
(x86)\GnuWin32\lib" scons-test.obj
link @c:\users\lmarchel\appdata\local\temp\tmpasoynv.lnk
scons: done building targets.
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20141202/5e78182e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20141202.log
Type: application/octet-stream
Size: 96774 bytes
Desc: not available
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20141202/5e78182e/attachment-0001.obj>


More information about the Scons-dev mailing list