Closed Bug 1506450 Opened 2 years ago Closed 2 years ago

Missing resources in mingw builds.


(Firefox Build System :: Toolchains, defect)

Not set


(firefox-esr60 fixed, firefox65 fixed)

Tracking Status
firefox-esr60 --- fixed
firefox65 --- fixed


(Reporter: jacek, Assigned: jacek)


(Blocks 1 open bug)



(3 files, 1 obsolete file)

I recently got an assertion when testing accessibility builds, where we assert because we can't load a manifest from DLL resources. The problem, however, is more general. It looks like all object files are missing resources (a quick test is to see if firefox.exe has its icon in Windows Explorer).

I think this worked before. I found an old build from July that had resources right, so this is a regression.
Hrm. The earliest successful build I can find myself has having sent to try is at which I recreated at

It is missing the icon in Windows Explorer.  But yea I agree I seem to remember the icon from some time ago...

Does about:buildconfig on that build give you anything useful to narrow down the mingw or clang version it was built with?
Flags: needinfo?(jacek)
Before looking at regression in current build config, I experimented with using llvm-rc (instead of binutils windres) and results seem promising. Technically, we could invoke llvm-rc directly (like we invoke rc.exe in clang-cl builds), but the assumption that mingw uses windres is pretty deep in build system. I used Martin's windres wrapper around llvm-rc from mingw-llvm:

Such toolchain generates binaries that include resources:
Patch for the toolchain looks like this:

It has two problems that need to be solved first:
- Windows doesn't like something about the manifest, which prevents firefox.exe to be ran
- llvm-rc doesn't know about EXSTYLE and NOT keywords in .rc files. This should be easy to add, a workaround I used for testing is:
Flags: needinfo?(jacek)
EXSTYLE is supported by llvm-rc now:
We don't need binutils for that anymore (and using binutils windres was broken for some reason).
Pushed by
Bump LLVM and mingw-w64 versions. r=froydnj
Use llvm-rc via mingw-llvm windres wrapper as resource compiler. r=froydnj
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Target Milestone: Firefox 65 → mozilla65

[ESR Uplift Approval Request]

If this is not a sec:{high,crit} bug, please state case for ESR consideration: The mingwclang build will not run without this patch.

User impact if declined: We won't be able to run tests for mingwclang; and tor will have to carry the patch.

Fix Landed on Version: 65.0a1 / 20181206092619

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Affects only mingwclang build

String or UUID changes made by this patch:

Attachment #9030147 - Attachment is obsolete: true
Attachment #9035550 - Flags: approval-mozilla-esr60?

Comment on attachment 9035550 [details] [diff] [review]
Bug 1506450 - Bump LLVM and use llvm-rc via mingw-llvm windres wrapper as resource compiler. (esr60) r=froydnj

compiler update for mingwclang build, approved for 60.5esr

Attachment #9035550 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
You need to log in before you can comment on or make changes to this bug.