The mingw-w64 project is currently GCC based. We should start creating a parallel project, mingw-w64-clang, that helps us introducing this new toolchain step by step to all the other components we need for the Windows bundles.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I am still testing the toolchain(s), but so far the result looks promising: I was able to compile the 64bit Firefox part with a .mozconfig file that resembles the one we ship (I only had to omit the sandbox compilation, as that one is broken right now, which we need to investigate).
Trac: Status: new to needs_review Keywords: TorBrowserTeam201812 deleted, TorBrowserTeam201901R added
I successfully built both our 32bit and 64bit firefox projects using bug_28328 in my tor-browser-build repo.
./rbm/rbm build firefox --target nightly --target torbrowser-windows-x86_64 should be the magical command to invoke (for 64bit; replace "x86_64" with "i686" for 32bit).
I'll look tomorrow into whether this is actually running (I am not even sure if the vanilla esr60 is supposed to be running right now).
And, yes, this is with Stylo enabled. \o/ (but sandboxing disabled as the compilation breaks :( )
I haven't tested to confirm it runs at this point. I'll check tomorrow.
I did a file-wise comparison:
Differing Files:
Only in tc/clang/include: ansidecl.hOnly in tc/clang/include: bfd.hOnly in tc/clang/include: bfdlink.hOnly in tc/clang/include: c++Only in tc/clang/include: dis-asm.hOnly in tc/clang/include/llvm/BinaryFormat: WasmRelocsOnly in tc/clang/include/llvm/MC: MCAnalysisOnly in tc/clang/include: plugin-api.hOnly in tc/clang/include: symcat.hOnly in tc/clang/lib/clang/8.0.0/include: sanitizerOnly in tc/clang/lib/clang/8.0.0/include: xrayOnly in tc/clang/lib/clang/8.0.0/lib: linuxOnly in tc/clang/lib/clang/8.0.0: shareOnly in tc/clang/lib: gccOnly in tc/clang/lib: libasan.aOnly in tc/clang/lib: libasan.laOnly in tc/clang/lib: libasan_preinit.oOnly in tc/clang/lib: libasan.soOnly in tc/clang/lib: libasan.so.1Only in tc/clang/lib: libasan.so.1.0.0Only in tc/clang/lib: libatomic.aOnly in tc/clang/lib: libatomic.laOnly in tc/clang/lib: libatomic.soOnly in tc/clang/lib: libatomic.so.1Only in tc/clang/lib: libatomic.so.1.1.0Only in tc/clang/lib: libc++.aOnly in tc/clang/lib: libc++abi.aOnly in tc/clang/lib: libc++abi.soOnly in tc/clang/lib: libc++abi.so.1Only in tc/clang/lib: libc++abi.so.1.0Only in tc/clang/lib: libc++experimental.aOnly in tc/clang/lib: libc++fs.aOnly in tc/clang/lib: libcilkrts.aOnly in tc/clang/lib: libcilkrts.laOnly in tc/clang/lib: libcilkrts.soOnly in tc/clang/lib: libcilkrts.so.5Only in tc/clang/lib: libcilkrts.so.5.0.0Only in tc/clang/lib: libcilkrts.specOnly in tc/clang/lib: libc++.soOnly in tc/clang/lib: libc++.so.1Only in tc/clang/lib: libc++.so.1.0Only in tc/clang/lib: libgcc_s.soOnly in tc/clang/lib: libgcc_s.so.1Only in tc/clang/lib: libgomp.aOnly in tc/clang/lib: libgomp.laOnly in tc/clang/lib: libgomp.soOnly in tc/clang/lib: libgomp.so.1Only in tc/clang/lib: libgomp.so.1.0.0Only in tc/clang/lib: libgomp.specOnly in tc/clang/lib: libitm.aOnly in tc/clang/lib: libitm.laOnly in tc/clang/lib: libitm.soOnly in tc/clang/lib: libitm.so.1Only in tc/clang/lib: libitm.so.1.0.0Only in tc/clang/lib: libitm.specOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMAMDGPUUtils.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMBPFInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMHexagonAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMHexagonCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMHexagonDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMHexagonDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMHexagonInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMLanaiInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMMipsInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMMSP430AsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMMSP430CodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMMSP430Desc.aOnly in geko/mingw-w64-clang/lib: libLLVMMSP430Info.aOnly in geko/mingw-w64-clang/lib: libLLVMNVPTXAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMNVPTXCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMNVPTXDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMNVPTXInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMPowerPCInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMSparcInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZAsmParser.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMSystemZInfo.aOnly in geko/mingw-w64-clang/lib: libLLVMXCoreAsmPrinter.aOnly in geko/mingw-w64-clang/lib: libLLVMXCoreCodeGen.aOnly in geko/mingw-w64-clang/lib: libLLVMXCoreDesc.aOnly in geko/mingw-w64-clang/lib: libLLVMXCoreDisassembler.aOnly in geko/mingw-w64-clang/lib: libLLVMXCoreInfo.aOnly in tc/clang/lib: liblsan.aOnly in tc/clang/lib: liblsan.laOnly in tc/clang/lib: liblsan.soOnly in tc/clang/lib: liblsan.so.0Only in tc/clang/lib: liblsan.so.0.0.0Only in tc/clang/lib: libquadmath.aOnly in tc/clang/lib: libquadmath.laOnly in tc/clang/lib: libquadmath.soOnly in tc/clang/lib: libquadmath.so.0Only in tc/clang/lib: libquadmath.so.0.0.0Only in tc/clang/lib: libsanitizer.specOnly in tc/clang/lib: libssp.aOnly in tc/clang/lib: libssp.laOnly in tc/clang/lib: libssp_nonshared.aOnly in tc/clang/lib: libssp_nonshared.laOnly in tc/clang/lib: libssp.soOnly in tc/clang/lib: libssp.so.0Only in tc/clang/lib: libssp.so.0.0.0Only in tc/clang/lib: libsupc++.aOnly in tc/clang/lib: libsupc++.laOnly in tc/clang/lib: libtsan.aOnly in tc/clang/lib: libtsan.laOnly in tc/clang/lib: libtsan.soOnly in tc/clang/lib: libtsan.so.0Only in tc/clang/lib: libtsan.so.0.0.0Only in tc/clang/lib: libubsan.aOnly in tc/clang/lib: libubsan.laOnly in tc/clang/lib: libubsan.soOnly in tc/clang/lib: libubsan.so.0Only in tc/clang/lib: libubsan.so.0.0.0Only in tc/clang/lib: libvtv.aOnly in tc/clang/lib: libvtv.laOnly in tc/clang/lib: libvtv.soOnly in tc/clang/lib: libvtv.so.0Only in tc/clang/lib: libvtv.so.0.0.0Only in geko/mingw-w64-clang/x86_64-w64-mingw32/include: expandedresources.hOnly in tc/clang/x86_64-w64-mingw32/include: _mingw_print_pop.hOnly in tc/clang/x86_64-w64-mingw32/include: _mingw_print_push.hOnly in geko/mingw-w64-clang/x86_64-w64-mingw32/lib: libntdllcrt.a
Yes, that was kind of intentional at this point for making sure we stay a) closer to esr60 as it is right now and, more importantly, b) I had issues to get the wrapper compiled on 32bit due to some weird header inclusion issue. So, I decided to leave that at the moment.
[snip]
I did a file-wise comparison:
Differing Files:
Yes, I am not surprised given that we build clang differently, and don't copy gcc stuff over. I think at some point we want to match Mozilla closer, given the grown importance of clang for Firefox builds, but not in that bug. I opened #29041 (moved) for that.
{{{
Only in geko/mingw-w64-clang/x86_64-w64-mingw32/include: expandedresources.h
Only in tc/clang/x86_64-w64-mingw32/include: _mingw_print_pop.h
Only in tc/clang/x86_64-w64-mingw32/include: _mingw_print_push.h
Only in geko/mingw-w64-clang/x86_64-w64-mingw32/lib: libntdllcrt.a
}}}
Why would we need 1481633 fixed on esr60 if the reason it came up (1471132) did not land on esr60? Moreover, from skimming that bug it seems to me that's an issue we should hit during compilation, if at all, which I did not.
Okay, I guess that's a strong indication of including the fix for bug 1506450 then. Marking this ticket as needs_revision
I've updated bug_28716_v2 to add the changes coming with bug 1506450 and rebased bug_28238_v2 on top of it (after adding the mozconfig changes due to the fix for 1506450). 64bit is still compiling fine, I am looking into the header path issue for 32bit.
FWIW: I have not patched our Firefox related build instructions so that they bundle the urct dlls instead of msvcr100 yet. That will happen in #28238 (moved).
I've updated bug_28716_v2 to add the changes coming with bug 1506450 and rebased bug_28238_v2 on top of it (after adding the mozconfig changes due to the fix for 1506450). 64bit is still compiling fine, I am looking into the header path issue for 32bit.
FWIW: I have not patched our Firefox related build instructions so that they bundle the ucrt dlls instead of msvcr100 yet. That will happen in #28238 (moved).
Why would we need 1481633 fixed on esr60 if the reason it came up (1471132) did not land on esr60? Moreover, from skimming that bug it seems to me that's an issue we should hit during compilation, if at all, which I did not.
Hrm. nsModule compilation might have been broken before 1471132 came along; and we just didn't have a mingw-clang build consistently working then.
A few different things can go wrong with nsModules: at compile time you could have missing symbols. Or at runtime, the resulting symbols in the binary might not be packed or ordered correctly. We do some ugly stuff were we basically make an array in the resulting binary, and then iterate through it like it was an array. If the layout, padding, or order is wrong, the code assumptions break and you get a runtime problem.
I've updated bug_28716_v2 to add the changes coming with bug 1506450 and rebased bug_28238_v2 on top of it (after adding the mozconfig changes due to the fix for 1506450). 64bit is still compiling fine, I am looking into the header path issue for 32bit.
FWIW: I have not patched our Firefox related build instructions so that they bundle the urct dlls instead of msvcr100 yet. That will happen in #28238 (moved).
I tested the x64 opt build; and it runs and loaded a few websites.
That's on Windows 10, right? I tested the artifact (https://queue.taskcluster.net/v1/task/X5K6N8O8SMqb9RarbIrp2w/runs/0/artifacts/public/build/target.zip) on Windows 7 and it seems to crash early on. I have not looked closer why but I noticed that firefox.exe etc. is still linked against msvcrt.dll which is not working for Windows 7. So, we need to teach the toolchain again how to link against a non-default runtime lib (ucrt this time) which has always been a fun exercise...
So, we need to teach the toolchain again how to link against a non-default runtime lib (ucrt this time) which has always been a fun exercise...
It is a default c runtime lib in msvc...
I don't know what is up with the runtime; I asked Jacek and he said "it's in mingw-w64-crt configure and it seems that the script passes --with-default-msvcrt=ucrt, which should do the right thing". (And yes, I am on Windows 10.) I think I have a Windows 7 VM; I will have to check when I have time...