summaryrefslogtreecommitdiffstats
path: root/third_party/mach_override/BUILD.gn
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-12-31 09:26:06 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-31 17:26:58 +0000
commit29de2c811de5e5fa6eb238bbcd45796907c037bd (patch)
treeac1ea9902b9958b3af28eda50a4301bf56c3ecf5 /third_party/mach_override/BUILD.gn
parent92469c8c4b7da052273dee1a31308663d1dd1e3d (diff)
downloadchromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.zip
chromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.tar.gz
chromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.tar.bz2
Prepare for -Wall for third-party code, -Wextra for chromium_code
This lands patch set 16 of https://codereview.chromium.org/1551753002/ (reviewed there), except for the changes to build/common.gypi and build/config/compiler/BUILD.gn. The changes to these two files are likely to break some bot I don't know about, and I don't want to keep reverting and relanding all these files. So this lands the parts that are hopefully harmless separately. BUG=573250 TBR=thestig Review URL: https://codereview.chromium.org/1557733002 Cr-Commit-Position: refs/heads/master@{#367252}
Diffstat (limited to 'third_party/mach_override/BUILD.gn')
-rw-r--r--third_party/mach_override/BUILD.gn20
1 files changed, 19 insertions, 1 deletions
diff --git a/third_party/mach_override/BUILD.gn b/third_party/mach_override/BUILD.gn
index 4672c46..ed1c331 100644
--- a/third_party/mach_override/BUILD.gn
+++ b/third_party/mach_override/BUILD.gn
@@ -2,6 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+config("libudis86_warnings") {
+ if (is_clang) {
+ cflags = [
+ # syn.c contains a switch with an assert(false) in a default:
+ # block. In release builds, the function is missing a return.
+ "-Wno-return-type",
+
+ # Fires once in decode.c.
+ "-Wno-sometimes-uninitialized",
+ ]
+ }
+}
+
static_library("libudis86") {
sources = [
"libudis86/decode.c",
@@ -29,7 +42,12 @@ static_library("libudis86") {
cflags = [ "-Wno-return-type" ]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code for warning flags to be ordered correctly.
+ ":libudis86_warnings",
+ ]
if (is_clang) {
# For UD_ASSERT(!"message");