Add kill switch for no-unqualified-std-cast-call

This commit is contained in:
Carmelo Messina 2022-07-06 13:35:31 +02:00
parent ad1a13d393
commit 0162eb0566
No known key found for this signature in database
GPG key ID: 968894BE688289FD

View file

@ -0,0 +1,36 @@
From: uazo <uazo@users.noreply.github.com>
Date: Wed, 6 Jul 2022 11:29:24 +0000
Subject: Add kill switch for no-unqualified-std-cast-call
Adds a new gn flag to disable the no-unqualified-std-cast-call option during build since it is not compatible
---
build/config/compiler/BUILD.gn | 2 +-
build_overrides/build.gni | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1531,7 +1531,7 @@ config("default_warnings") {
"-Wno-ignored-pragma-optimize",
]
- if (!is_nacl) {
+ if (!is_nacl && !compile_clangd_index) {
# TODO(https://crbug.com/1300731) Clean up and enable.
cflags += [ "-Wno-unqualified-std-cast-call" ]
}
diff --git a/build_overrides/build.gni b/build_overrides/build.gni
--- a/build_overrides/build.gni
+++ b/build_overrides/build.gni
@@ -42,6 +42,8 @@ declare_args() {
# Allows googletest to pretty-print various absl types. Disabled for nacl due
# to lack of toolchain support.
gtest_enable_absl_printers = !is_nacl
+
+ compile_clangd_index = false
}
# Allows different projects to specify their own suppression/ignore lists for
--
2.25.1