2022-11-29 22:16:09 +01:00
|
|
|
--- a/build/config/compiler/BUILD.gn
|
|
|
|
+++ b/build/config/compiler/BUILD.gn
|
2023-01-11 01:28:40 +01:00
|
|
|
@@ -191,6 +191,10 @@
|
|
|
|
current_cpu == "x64"))))
|
2022-11-29 22:16:09 +01:00
|
|
|
}
|
|
|
|
|
2023-01-11 01:28:40 +01:00
|
|
|
+declare_args() {
|
|
|
|
+ use_cxx17 = false
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
if (is_android || (is_chromeos_ash && is_chromeos_device)) {
|
|
|
|
# Set the path to use orderfile for linking Chrome
|
|
|
|
# Note that this is for using only one orderfile for linking
|
|
|
|
@@ -605,7 +609,7 @@
|
|
|
|
cflags_cc += [ "-fno-trigraphs" ]
|
|
|
|
}
|
|
|
|
} else if (is_clang) {
|
|
|
|
- if (is_chromeos_device) {
|
|
|
|
+ if (is_chromeos_device || use_cxx17) {
|
|
|
|
# TODO(crbug.com/1392471): Support C++20 in CrOS toolchain.
|
|
|
|
cflags_cc += [ "-std=${standard_prefix}++17" ]
|
2022-11-29 22:16:09 +01:00
|
|
|
} else {
|