gnome.mkenums: Use rspfiles on Windows when possible #14391
+56
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This MR aims to update the work made in #4966 to allow (known) custom targets, like Gnome's
glib-mkenums
, to use response files.I'm setting it as draft because this doesn't completely work on Windows; this is because I cannot find a suitable point in the target lifecycle to convert arguments to response files:
CUSTOM_COMMAND
rule rspable means I have to supply a placeholder torsp_content
-- see below)as_meson_exe_cmdline
orget_executable_serialisation
) seems like the wisest choice, however on Windows scripts must go through an interpreter. In the case ofglib-mkenums
it's Python, but it's not possible to ensure I'm converting just the call toglib-mkenums
, as the command + arguments have already been completely flattenedAll feedback, and ideas to fix the last hurdle, is appreciated.
(EDIT -- I think there's still an outstanding bug, in that the space escaping doesn't work in some circumstances, yielding a broken interpreter call
C:\Program
instead of the full Python path. I need to sort out the response file handling before being able to determine where it happens and why.)Fixes #6710