[all-commits] [llvm/llvm-project] 9e3d91: [llvm-windres] Change the interpretation of --prep...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Mon Dec 18 02:31:20 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9e3d915d8ebf86e24c9ff58766be8e7c6aa7b0c0
https://github.com/llvm/llvm-project/commit/9e3d915d8ebf86e24c9ff58766be8e7c6aa7b0c0
Author: Martin Storsjö <martin at martin.st>
Date: 2023-12-18 (Mon, 18 Dec 2023)
Changed paths:
M llvm/test/tools/llvm-rc/windres-preproc.test
M llvm/tools/llvm-rc/llvm-rc.cpp
Log Message:
-----------
[llvm-windres] Change the interpretation of --preprocessor to match Binutils 2.36 (#75391)
Binutils 2.36 had a somewhat controversial change in how the
--preprocessor option was handled in GNU windres; previously, the option
was interpreted as a part of the command string, potentially containing
multiple arguments (which even was hinted at in the documentation).
In Binutils 2.36, this was changed to interpret the --preprocessor
argument as one argument (possibly containing spaces) pointing at the
preprocessor executable.
The existing behaviour where implicit arguments like -E -xc -DRC_INVOKED
are dropped if --preprocessor is specified, was kept.
This was a breaking change for some users of GNU windres, see
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=21c33bcbe36377abf01614fb1b9be439a3b6de20,
https://sourceware.org/bugzilla/show_bug.cgi?id=27594, and
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=5edb8e3f5ad8d74a83fc0df7f6e4514eed0aa77f.
As multiple years have passed since, the behaviour change seems to be
here to stay, and any users of the previous form of the option have been
forced to avoid this construct. Thus update llvm-windres to match the
new way Binutils of handling this option.
One construct for specifying the path to the preprocessor, which works
both before and after binutils 2.36 (and this change in llvm-windres) is
to specify options like this:
--preprocessor path/to/executable --preprocessor-arg -E
--preprocessor-arg -xc -DRC_INVOKED
More information about the All-commits
mailing list