| Using clang-cl to ship Windows builds | David Major | 10/07/18 13:27 | Bug 1443590 is switching our official Windows builds to use clang-cl
as the compiler. Please keep an eye out for regressions and file a blocking bug for anything that might be fallout from this change. I'm especially interested in hearing about the quality of the debugging experience. It's possible that the patch may bounce and we'll go back and forth to MSVC for a while. You can check your build's compiler at `about:buildconfig`. Treeherder is running an additional set of MSVC jobs on mozilla-central to make sure we can fall back to a green MSVC if needed. Watch for more toolchain changes to come. The next steps after this will be to switch to lld-link and enable ThinLTO. That will open the door to a cross-language LTO that could inline calls between Rust and C++. In the longer term we can look into cross-compiling from Linux. But for now, shipping our most-used platform with an open-source compiler is a huge milestone in and of itself. Big thanks to everyone who has contributed to this effort on the Mozilla side, and also big thanks to the developers of LLVM and Chromium who helped make clang on Windows a realistic possibility. |
| Re: Using clang-cl to ship Windows builds | Chris Peterson | 10/07/18 13:31 | How does the performance of clang-cl builds compare to MSVC builds on
benchmarks like Speedometer? > _______________________________________________ > firefox-dev mailing list > firef...@mozilla.org > https://mail.mozilla.org/listinfo/firefox-dev |
| Re: Using clang-cl to ship Windows builds | Gregory Szorc | 10/07/18 13:51 | On Tue, Jul 10, 2018 at 1:29 PM, David Major <dma...@mozilla.com> wrote:A lot of people have wanted to see this day for years (for various reasons - an open source toolchain, potential for cross compiling, unified toolchains across platforms, etc). This is a *major* milestone. And while the transition will likely have a few bumps, the payoff should be well worth it. Thank you to everyone who helped us get here. From the initial work to support Clang on Windows a few years ago. To the upstream work that was put into LLVM and Clang (especially by Google/Chromium). To those that worked through all the issues to transition the compiler today. This was a significant effort by a lot of people. We should all be ecstatic we're finally crossing this bridge. I know I am! Congratulations! |
| Re: Using clang-cl to ship Windows builds | David Major | 10/07/18 14:03 | At the moment, performance is a mixed bag. Some tests are up and some
are down. In particular I believe Speedometer is down a few percent. Note however that clang-cl is punching above its weight. These builds currently have neither LTO nor PGO, while our MSVC builds use both of those. Any regressions that we're seeing ought to be short-lived. Once we enable LTO and PGO, I expect clang to be a clear performance win. If the short-term regressions end up being unacceptable, we can revert to MSVC later in the release, but at this early point in the cycle that shouldn't prevent us from collecting data on Nightly.
> On 2018-07-10 1:29 PM, David Major wrote: |
| Re: Using clang-cl to ship Windows builds | Bobby Holley | 10/07/18 14:37 | +1. This is really fantastic news, and frankly happened way faster than I
would have thought possible. Thanks to everyone involved! On Tue, Jul 10, 2018 at 1:51 PM Gregory Szorc <g...@mozilla.com> wrote:
> A lot of people have wanted to see this day for years (for various reasons |
| Re: Using clang-cl to ship Windows builds | pedro....@gmail.com | 11/07/18 05:01 | Is there a link to the required changes? I'm curious.
|
| Re: Using clang-cl to ship Windows builds | Sylvestre Ledru | 11/07/18 05:28 | One of the meta bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=752004 Look at the list of "Depends on" to see what have been required! (not mentioning other related work like the Linux and Mac support). Sylvestre |
| Re: Using clang-cl to ship Windows builds | Thomas Daede | 11/07/18 09:48 | On 07/10/2018 01:29 PM, David Major wrote:Another great effect of this change is that it finally fixes the issue of constantly running out of virtual address space when linking Win32 builds: https://bugzilla.mozilla.org/show_bug.cgi?id=709193 This was, for example, blocking AV1 support on Win32 until today. Thanks for the great work! |
| Re: Using clang-cl to ship Windows builds | Mike Hommey | 11/07/18 15:01 | That will still block it, until clang-cl actually becomes the compiler
we use to ship. At the moment, it's not certain it will stay that way, so we need to keep MSVC builds working, including PGO. Mike |
| Re: Using clang-cl to ship Windows builds | halivi...@gmail.com | 11/07/18 20:50 | I hope that both Firefox and Chrome continue to keep the build and tests running on MSVC. It would suck if for example we can't build Firefox with MSVC.
Will the Firefox team publish builds of Firefox from both MSVC and Clang with symbols so we can profile ourselves and compare which is faster for the webpages we use? |
| Re: Using clang-cl to ship Windows builds | Anthony Jones | 11/07/18 23:34 | On Thursday, 12 July 2018 15:50:40 UTC+12, halivi...@gmail.com wrote:I can't comment on Chrome. The MSVC nightly builds will likely continue until we fully commit to clang-cl. It is expensive to maintain MSVC workarounds and given that cross-language LTO[1] is compelling for Firefox, it is unlikely we'd return to MSVC. Anthony [1] https://github.com/rust-lang/rust/issues/49879 |
| Re: Using clang-cl to ship Windows builds | Mike Hommey | 12/07/18 00:04 | Actually, I don't think we do produce MSVC nightly builds. We *do* MSVC
build on automation, but they're not exactly nightlies. You won't find them along other nightlies. And until bug 1474756 lands, those builds aren't even with PGO enabled. Mike |
| Re: Using clang-cl to ship Windows builds | Jörg Knobloch | 12/07/18 16:26 | On 10/07/2018 22:29, David Major wrote: > Please keep an eye out for regressions and file a blocking bug forJust out of interest a question from the de-facto Thunderbird maintainer: Does clang-cl give an executable that does the same thing as the executable created by MS VS C++? After switching to clang-cl, one of our Window10-only test failures magically disappeared (https://bugzilla.mozilla.org/show_bug.cgi?id=1469188) and another one magically appeared on Windows only (https://bugzilla.mozilla.org/show_bug.cgi?id=1475166). I'm not in a position to debug any of that, it's just an observation. Jörg. |
| Re: Using clang-cl to ship Windows builds | Anthony Jones | 12/07/18 18:10 | Changing the compiler will change all the timing characteristics. This can reliably produce different outcomes on race conditions. We've seen some of that. You're likely to be seeing the same thing.
|
| Re: Using clang-cl to ship Windows builds | David Major | 21/08/18 15:02 | A quick update about performance: ThinLTO and PGO were enabled for our
clang-cl builds over the last few weeks. These optimizations have cancelled the previous regressions and brought clang well ahead of MSVC: https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=2adb3cb404ad&newProject=try&newRevision=5336df94a9ce&framework=1 To call out a few: Speedometer scores increased by 6% on Win64 and 12% on Win32, and the most dramatic improvement was displaylist_mutate at 27%! As far as I'm aware, no blockers have come up and clang-cl is still looking good for the 63 train.
|
| Re: Using clang-cl to ship Windows builds | Stuart Philp | 21/08/18 15:15 | That is fantastic, lots of nice wins!
|