23 lines
725 B
Diff
23 lines
725 B
Diff
--- a/build/config/compiler/BUILD.gn
|
|
+++ b/build/config/compiler/BUILD.gn
|
|
@@ -191,6 +191,10 @@
|
|
current_cpu == "x64"))))
|
|
}
|
|
|
|
+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" ]
|
|
} else {
|