diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index 4cc16f854f..4c10262588 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("clang.gni") import("//build/toolchain/clang.gni") +import("clang.gni") # Enables some extra Clang-specific warnings. Some third-party code won't # compile with these so may want to remove this config. @@ -13,21 +13,12 @@ config("extra_warnings") { # Warns when a const char[] is converted to bool. "-Wstring-conversion", + # Warns when a source file doesn't have a newline at end-of-file. # This is to match Fuchsia, which enables this warning. "-Wnewline-eof", ] - if (use_xcode) { - # Xcode clang throws up warnings about the way we do mutexes. - cflags += [ - "-Wno-thread-safety", - "-Wno-thread-safety-analysis", - ] - } else { - cflags += [ - "-Wthread-safety", - ] - } + if (is_fuchsia) { cflags += [ "-Wno-implicit-int-float-conversion" ] } diff --git a/build/secondary/third_party/libcxx/BUILD.gn b/build/secondary/third_party/libcxx/BUILD.gn index 5d68029710..46b80a419e 100644 --- a/build/secondary/third_party/libcxx/BUILD.gn +++ b/build/secondary/third_party/libcxx/BUILD.gn @@ -65,6 +65,12 @@ source_set("libcxx") { "LIBCXX_BUILDING_LIBCXXABI", ] + # While no translation units in Flutter engine enable RTTI, it may be enabled + # in one of the third party dependencies. This mirrors the configuration in + # libcxxabi. + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + if (is_clang) { # shared_mutex.cpp and debug.cpp are purposefully in violation. cflags_cc = [ "-Wno-thread-safety-analysis" ]