C++17 in Chromium

694 views
Skip to first unread message

Long Le

unread,
May 10, 2018, 2:04:07 AM5/10/18
to Chromium-dev
Now C++17 is officially newest standard of C++ with many good features, can we now use it in Chromium ? If not what is the challenge for us to apply this standard? 

Daniel Cheng

unread,
May 10, 2018, 2:10:16 AM5/10/18
to philo...@gmail.com, Chromium-dev, Nico Weber, Taiju Tsuiki
https://bugs.chromium.org/p/chromium/issues/detail?id=752720 has more info about what's blocking the move to C++17.

Daniel

On Wed, May 9, 2018 at 11:04 PM Long Le <philo...@gmail.com> wrote:
Now C++17 is officially newest standard of C++ with many good features, can we now use it in Chromium ? If not what is the challenge for us to apply this standard? 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/eea38fed-4b15-42aa-a44d-c18ec55d8e07%40chromium.org.

PhistucK

unread,
May 10, 2018, 2:10:17 AM5/10/18
to philo...@gmail.com, Chromium-dev
The Google Style Guide mandates most of the new feature usage. Some features are dimmed unreadable, confusing, unmaintainable or similar, so they are not allowed.
Plus, features may be banned if the compilers used to compile Chromium do not support them, or their support is buggy.

PhistucK


On Thu, May 10, 2018 at 9:04 AM Long Le <philo...@gmail.com> wrote:
Now C++17 is officially newest standard of C++ with many good features, can we now use it in Chromium ? If not what is the challenge for us to apply this standard? 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Taiju Tsuiki

unread,
May 10, 2018, 8:04:55 AM5/10/18
to phis...@gmail.com, philo...@gmail.com, Chromium-dev, Hidehiko Abe
The main part of Chromium is getting ready to compile in C++17. And, the major blockers of C++17 are NaCl and libchrome.
pnacl-clang in NaCl toolchain is based on clang-3.7.0, which doesn't support C++17. I don't know much about its deprecation status, but it's likely alive for awhile.
libchrome is the other. It's a subset of chrome that is imported to Android repository, pulled to ChromeOS, and used for several services including ARC++. As it's linked to Android framework itself to talk to Chrome with Mojo for ARC++, we may have to migrate Android framework to C++17 first.

2018年5月10日(木) 15:09 PhistucK <phis...@gmail.com>:

Nico Weber

unread,
May 10, 2018, 9:39:57 AM5/10/18
to Taiju Tsuiki, PhistucK, Long Le, Chromium-dev, Hidehiko Abe
libchrome hasn't been an issue for any other toolchain changes (c++11, 14, lld, etc) -- are you sure that's a blocker?

NaCl has been an issue for all toolchain changes though.

On Thu, May 10, 2018 at 8:03 AM, Taiju Tsuiki <tz...@chromium.org> wrote:
The main part of Chromium is getting ready to compile in C++17. And, the major blockers of C++17 are NaCl and libchrome.
pnacl-clang in NaCl toolchain is based on clang-3.7.0, which doesn't support C++17. I don't know much about its deprecation status, but it's likely alive for awhile.
libchrome is the other. It's a subset of chrome that is imported to Android repository, pulled to ChromeOS, and used for several services including ARC++. As it's linked to Android framework itself to talk to Chrome with Mojo for ARC++, we may have to migrate Android framework to C++17 first.

2018年5月10日(木) 15:09 PhistucK <phis...@gmail.com>:
The Google Style Guide mandates most of the new feature usage. Some features are dimmed unreadable, confusing, unmaintainable or similar, so they are not allowed.
Plus, features may be banned if the compilers used to compile Chromium do not support them, or their support is buggy.

PhistucK


On Thu, May 10, 2018 at 9:04 AM Long Le <philo...@gmail.com> wrote:
Now C++17 is officially newest standard of C++ with many good features, can we now use it in Chromium ? If not what is the challenge for us to apply this standard? 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABc02_LcssLQBGVSdXQCFgzDM8XQNOHewFyEu6sHp-%2BdMQ%2Bryg%40mail.gmail.com.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.

Allan Sandfeld Jensen

unread,
May 19, 2018, 4:20:38 PM5/19/18
to chromi...@chromium.org, philo...@gmail.com
As an embedder I would really prefer we kept a more steady pace and stuck with
C++14 for a while. It would make it easier to maintain on non-default
configurations.

Besides C++14 has only recently been fully accepted in Chromium, and is still
used somewhat inconsistenly. I think it would be better to not to mix even
more haphazard refactoring in. The recent addition of constexpr everywhere
meant it was incorrectly used in several dozen places because it appears clang
is more forgiving in incorrect usage than other compilers.

Best regard
'Allan



Allan Sandfeld Jensen

unread,
May 19, 2018, 4:45:14 PM5/19/18
to chromi...@chromium.org, philo...@gmail.com
I forgot to ask: Is there anything in particular from C++17 you want to use
for something critical?

'Allan



Reply all
Reply to author
Forward
0 new messages