From 0162eb0566bceaa9deb4d4dbbc6d269ca7d05d7b Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Jul 2022 13:35:31 +0200 Subject: [PATCH] Add kill switch for no-unqualified-std-cast-call --- ...tch-for-no-unqualified-std-cast-call.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build/patches/Add-kill-switch-for-no-unqualified-std-cast-call.patch diff --git a/build/patches/Add-kill-switch-for-no-unqualified-std-cast-call.patch b/build/patches/Add-kill-switch-for-no-unqualified-std-cast-call.patch new file mode 100644 index 00000000..dcf23922 --- /dev/null +++ b/build/patches/Add-kill-switch-for-no-unqualified-std-cast-call.patch @@ -0,0 +1,36 @@ +From: uazo +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