[cmake-developers] ninja bug on windows
Peter Kümmel
syntheticpp at gmx.net
Mon Mar 12 17:23:53 EDT 2012
On 11.03.2012 05:05, Peter Collingbourne wrote:
> On Fri, Mar 09, 2012 at 02:10:45PM -0500, Bill Hoffman wrote:
>> I am seeing that ninja always wants to relink the executables for me
>> every time it is run. The output is this:
>>
>> $ ninja
>> [1/9] Linking C static library
>> Utilities\cmlibarchive\libarchive\cmlibarchive.lib
>> [2/9] Linking CXX executable bin\cmake.exe
>> [3/9] Linking CXX executable bin\cmw9xcom.exe
>> [4/9] Linking CXX executable bin\cpack.exe
>> [5/9] Linking CXX executable bin\ctest.exe
>> [6/9] Linking CXX executable Tests\CMakeLib\CMakeLibTests.exe
>> [7/9] Generating ../Docs/ctest.txt
>> [8/9] Generating ../Docs/cpack.txt
>> [9/9] Generating ../Docs/cmake.txt
>>
>> Looks like the problem is libarchive getting recreated each time.
>
> This seems to be a problem with the response file support in the
> Windows branch of Ninja. That branch of Ninja will always relink
> any target (in this case cmlibarchive.lib) in the case where the
> list of object files exceeds the command line length limit, because
> it causes Ninja to use a response file with a different generated
> name every time.
I've fixed this by caching the used temporary file names.
And I've updated the ninja.exe.
Peter
More information about the cmake-developers
mailing list