ARMClang: response file do not escape paths if used on windows
My testing system: Using ninja generator, ARMClang 6.14, CMake 3.18.1, OS: windows, ninja 1.10.0.
The response files generated for ARMClang do not have files escaped as required (see the note in https://developer.arm.com/documentation/101754/0614/armclang-Reference/armclang-Command-line-Options/-file?search=5eec717fe24a5e02d07b26d8).
An example taken from .rsp file: -I..\mbed-os\connectivity\cellular\include\cellular
Running armclang results with a warning: ignoring nonexistent directory "..mbed-osconnectivitycellular
. The path is ignored and compilation fails - it can't find any includes.
If I manually escape all paths in one response file, it compiles OK. The testing command I am using:
armclang.exe --target=arm-arm-none-eabi @mbed-os\CMakeFiles\mbed-os.dir\connectivity\lwipstack\source\LWIPInterface.o.rsp -MD -MT mbed-os\CMakeFiles\mbed-os.dir\connectivity\lwipstack\source\LWIPInterface.o -MF mbed-os\CMakeFiles\mbed-os.dir\connectivity\lwipstack\source\LWIPInterface.o.d -o mbed-os\CMakeFiles\mbed-os.dir\connectivity\lwipstack\source\LWIPInterface.o -c ..\mbed-os\connectivity\lwipstack\source\LWIPInterface.cpp
I can share an example to reproduce this locally if required.
For ninja, there was similar issue https://github.com/ninja-build/ninja/pull/1627, also pointing to have it fix on CMake side.