[meta] Compile as C++20
Categories
(Firefox Build System :: General, task, P3)
Tracking
(firefox147 fixed)
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: cpeterson, Assigned: emilio)
References
(Blocks 9 open bugs, Regressed 1 open bug)
Details
(Keywords: meta, perf-alert)
Attachments
(3 files, 1 obsolete file)
Who knows when we'll be able to compiled with -std=c++20, but in the meantime we can use this meta bug to gather the work needed to compile as C++20 and the new improvements that will become available with C++20.
When compiling as C++20, __cplusplus == 202002.
Summary of C++20 language changes: https://en.cppreference.com/w/cpp/20
Clang's C++20 support: https://clang.llvm.org/cxx_status.html#cxx20
GCC's C++20 support: https://gcc.gnu.org/projects/cxx-status.html#cxx20
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
This slide deck from a Google engineer details some of the problems (and fixes) found when updating Chrome from C++17 to C++20:
"C++20, How Hard Could It Be"
https://docs.google.com/presentation/d/1HwLNSyHxy203eptO9cbTmr7CH23sBGtTrfOmJf9n0ug/preview?resourcekey=0-GH5F3wdP7D4dmxvLdBaMvw
Chrome's C++20 meta bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1284275
Comment 2•3 years ago
|
||
Thanks for working on this!
Comment 3•3 years ago
|
||
FYI, I don't expect we'd be able to actually switch to C++20 for a few years.
Comment 4•3 years ago
|
||
What are our unlisted blockers? Our good friends hazard-builds and android toolchains?
FWIW, we went c++17 on 2019-12-03, so it's we're neither really ahead nor behind our previous pace.
| Reporter | ||
Comment 5•3 years ago
|
||
(In reply to Kelsey Gilbert [:jgilbert] from comment #4)
What are our unlisted blockers? Our good friends hazard-builds and android toolchains?
IIUC, we still need to support clang 5.0 for some older Linux distros, but I don't know which distros are blocking us today. There is some 2019 discussion in bug 1579189 comment 6 about clang support on Debian 8 and 9, though Sylvestre replied that clang versions up to 8 were available on Debian 8 at that time.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•10 months ago
|
Comment 6•8 months ago
|
||
Chris, Does Firefox have a time frame for switching to C++20? I ask because we have a library in Thunderbird that's gone EOL and the new version requires C++20.
| Reporter | ||
Comment 7•8 months ago
|
||
(In reply to Corey Bryant from comment #6)
Does Firefox have a time frame for switching to C++20? I ask because we have a library in Thunderbird that's gone EOL and the new version requires C++20.
We don't have a definite ETA, but the priority has increased because Gecko depends on Google's Skia graphics and the next version will require C++20. The main blocker is updating our minimum clang, gcc, and libstdc++ versions in bug 1880779.
Just curious for future reference, what Thunderbird library will require C++20?
Comment 8•8 months ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #7)
(In reply to Corey Bryant from comment #6)
Does Firefox have a time frame for switching to C++20? I ask because we have a library in Thunderbird that's gone EOL and the new version requires C++20.
We don't have a definite ETA, but the priority has increased because Gecko depends on Google's Skia graphics and the next version will require C++20. The main blocker is updating our minimum clang, gcc, and libstdc++ versions in bug 1880779.
Just curious for future reference, what Thunderbird library will require C++20?
Chatted with Chris offline about this.
Comment 9•8 months ago
|
||
(In reply to Corey Bryant from comment #6)
Chris, Does Firefox have a time frame for switching to C++20? I ask because we have a library in Thunderbird that's gone EOL and the new version requires C++20.
Chatted with glandium and he said updating the minimum versions would come somewhere in the 140 or 141 cycle, probably.
| Reporter | ||
Comment 10•5 months ago
|
||
Updated•4 months ago
|
Updated•4 months ago
|
| Reporter | ||
Comment 12•2 months ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #11)
What's blocking this from landing?
After updating the base toolchain's minimum compiler versions, there are half a dozen new C++20 build errors that need to be fixed. They are mostly gcc issues that couldn't be tested with the older compiler versions. I have fixes for most of them. I can file bugs for each of them and submit the patches I have so far.
| Reporter | ||
Comment 13•1 month ago
|
||
At this time, the remaining blockers to updating to C++20 (that I know of) are:
- Bug 1992321:
moz_xmalloclink errors on Linux. I don't know why bumping the GCC version and toolchain in bug 1981921 causesmoz_xmallocto become undefined when compiling as C++20 on both gcc and clang on Linux (but not with C++17 and not on macOS or Android). I could compile as C++20 with clang on Linux before bug 1981921. - Bug 1997382: objidl.idl build errors on Windows.
- Update the test_toolchain_configure.py tests for C++20: https://searchfox.org/firefox-main/source/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
| Reporter | ||
Comment 14•1 month ago
|
||
| Reporter | ||
Updated•1 month ago
|
| Assignee | ||
Comment 15•1 month ago
|
||
Co-authored-by: Chris Peterson <cpeterson@mozilla.com>
Updated•1 month ago
|
| Assignee | ||
Comment 16•1 month ago
|
||
| Assignee | ||
Comment 17•1 month ago
|
||
Current try runs:
Comment 18•1 month ago
|
||
Comment 19•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a076ddec6082
https://hg.mozilla.org/mozilla-central/rev/47398d3d17dd
Comment 20•27 days ago
|
||
(In reply to Serban Stanca [:SerbanS] from comment #19)
https://hg.mozilla.org/mozilla-central/rev/a076ddec6082
https://hg.mozilla.org/mozilla-central/rev/47398d3d17dd
Perfherder has detected a talos performance change from push 47398d3d17ddadd277fcdb1d60f24fdf61444dcd.
If you have any questions, please reach out to a performance sheriff. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 6% | perf_reftest_singletons input-type-number-setAttribute.html | linux1804-64-shippable-qr | e10s fission stylo webrender | 191.19 -> 179.41 |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a performance sheriff to do that for you.
You can run all of these tests on try with ./mach try perf --alert 47419
The following documentation link provides more information about this command.
Description
•