[cmake-developers] Ninja: Regressions re. def file handling with MSVC
Amine Khaldi
amine.khaldi at reactos.org
Sat Mar 31 20:01:16 EDT 2012
Hi,
Please note that commit a2514f15fae34abb6f29dddf6f5cfe8b171a8035 broke
the handling of def files when using MSVC. We get errors like:
ninja: ERROR: 'reactos\base\applications\kbswitch\kbsdll\kbsdll.def',
needed by 'base\applications\kbswitch\kbsdll\kbsdll.dll', missing and no
known rule to make it
I found this revision by doing a bisect, I hope this will help solving
this issue.
In the gcc build we declare this generated def as an external object,
but if I do the same with the MSVC build, the def file gets inserted
into the link command twice:
* The first one directly, i.e. link.exe /nologo <the def file here> <the
rest of the link command>
* The second time, it's passed using a /DEF:<the def file>
Needless to say, the first insertion is spurious and invalid, and it
triggers " <def file> : fatal error LNK1107: invalid or corrupt file:
cannot read at 0x3BBD.
Regards,
Amine.
More information about the cmake-developers
mailing list