Keep Windows .rsp files with Ninja
Ninja normally deletes each response .rsp file if the target build is successful. When debugging a program, we may need to see all the commands run before failure by keeping the .rsp files.
Ninja keeps the .rsp files after compilation by using option:
ninja -d keeprspNinja is a build backend used by Meson build system and CMake as a fast, modern replacement for GNU Make. .rsp files are simply a plain text file containing the command fragment to be run on the command line.
For example, a build line:
cc -Iinc hello.c -lmis implemented with an .rsp file by the build system as:
cc hello.rspwhere file foo.rsp contains
-Iinc hello.c -lmThere is currently not a Meson or CMake option to keep the .rsp files. Instead, manually invoke Ninja as above when Meson or CMake has configured the build. That is, instead of:
cmake --build build --target hello -vor
meson compile -C builddo:
ninja -C build -d keeprsp hello