Use llvm-rc.exe instead of rc.exe when available
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
(Blocks 1 open bug)
Details
(Keywords: in-triage)
Attachments
(1 file)
Unfortunately, contrary to windres, used for mingw builds, the build currently fails with llvm-rc, with:
llvm-rc: Error parsing file: expected '-', '~', integer or '(', got VS_FF_PRERELEASE
or
llvm-rc: Error parsing file: expected '-', '~', integer or '(', got VS_FF_DEBUG
depending if it's opt or debug.
Assignee | ||
Comment 1•4 years ago
|
||
So the reason we get these errors when using llvm-rc is that... drum-roll... despite accepting preprocessor options, llvm-rc doesn't preprocess. I got what look like proper resource files out of llvm-rc for a couple of our rc files by preprocessing them manually first.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
This makes us use one less tool from MSVC, and removes one more use of wine
in cross builds.
We replace the call to either rc/llvm-rc or windres with a wrapper script.
While the script is not strictly needed for the latter, we use a wrapper
in that case anyway because it's one step towards fixing bug 1498414.
For llvm-rc, however, we need a wrapper because llvm-rc doesn't preprocess
on its own, so the wrapper does that too.
The wrapper script also allows to deal with the default flags passed to
llvm-rc or windres, rather than inherit them from old-configure.
We also need to explicitly pass the codepage to llvm-rc, which was not
necessary with rc (presumably, llvm-rc has a different default).
While here, remove the unused WINDRES subst from js/src/old-configure.in.
Also, while here, we remove --use-temp-file, because as described in the
linked bug and in the windres manual page, it was used to work around bugs
on Windows 98 and earlier.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/fb7a0368d7b9 Use llvm-rc instead of rc.exe. r=mhentges,froydnj
Comment 4•4 years ago
|
||
bugherder |
Description
•