Ninja: UTF-8 response files without BOM lead to build errors
The attached example fails with Cmake 3.24.0, Ninja 1.11.0 and MSVC 2019 on a Windows 10 machine (sorry for the cluttered file structure, long paths was the only way I found to force cmake/ninja to generate a linker response file).
LINK : fatal error LNK1181: cannot open input file 'in order to2\force cmake to\generate an rsp file\we will need\a very long path in order\to exceed the cli\argument length limit and\add some umlauts like\äöü\CMakeFiles\object.dir\addition\add_char.cpp.obj' ninja: build stopped: subcommand failed.
The problem seems to be closely related to #21792 (closed). If I add the BOM manually to @CMakeFiles\component.rsp, the linker statement is successful.
Edited by Brad King