[Scons-users] TempFileMunge conflicts with ccache
Andrew C. Morrow
andrew.c.morrow at gmail.com
Thu Dec 6 12:14:41 EST 2018
In the MongoDB build, we enable TempFileMunge for non-windows platforms,
since sometimes we have truly astronomically long link lines which break
even the linux command line length limitations.
https://github.com/mongodb/mongo/blob/master/SConstruct#L1478-L1496
A user reported that their builds failed when trying to use ccache:
https://jira.mongodb.org/browse/SERVER-38389
It appears that TempFileMunge just assumes that only the first token of the
command is actually the "compiler", and ends up feeding the response file
directly to ccache, rather than invoking, say `ccache
g++ @/path/to/temp/file`.
On the other hand, could this even work in principle? Is ccache smart
enough to know to "see into" the response file in order to interact with
its cache correctly? This CMake bug suggests not:
https://github.com/kripken/emscripten/issues/4750
I did steer the user towards using the SCons cache instead of ccache, and
provided a workaround of setting MAXLINELENGTH=<huge-number>
At the very least, if ccache and response files can't be mixed, perhaps
TempFileMunge could include some guard rails here to bail out if it sees
the first token to be ccache.
Thoughts?
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20181206/0b0e1fdf/attachment.html>
More information about the Scons-users
mailing list