mirror of
https://github.com/mesonbuild/meson.git
synced 2026-06-24 08:48:03 +00:00
This commit reenables and implements correct response file support for Nasm. Fortified with the knowledge of #15867 and #15872, and with a quick chat with @nirbheek, I realised that the easiest way to fix this (since Ninja does not support custom argument spacing) is to do it the obvious way, with Meson's custom command support. This commit implements an abridged version of that: when a non-standard RspFileSyntax value is detected, the active NinjaBuildRule is temporarily resolved to the corresponding NinjaRule on the fly and if the latter says that a response file will be used, the NinjaBuildRule is immediately converted into a CUSTOM_COMMAND, completing the arguments with the bits for infile and outfile and triggering the executable serialization. That serializes the response file and pickles the command. Fixes building mpv with MSVC 2022+ and fdk-aac enabled.