diff options
author | thakis <thakis@chromium.org> | 2016-01-04 12:10:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-04 20:11:26 +0000 |
commit | 87ec0f76f838b5ff7c0b4aa80d8d2bf06418eb45 (patch) | |
tree | 54c1ab21166966232fe36eff040799d57168e875 | |
parent | 932e1e5939963b5b67019f428e8f209246069a44 (diff) | |
download | chromium_src-87ec0f76f838b5ff7c0b4aa80d8d2bf06418eb45.zip chromium_src-87ec0f76f838b5ff7c0b4aa80d8d2bf06418eb45.tar.gz chromium_src-87ec0f76f838b5ff7c0b4aa80d8d2bf06418eb45.tar.bz2 |
Simplify mach_override/BUILD.gn a bit.
* assert(is_mac || is_ios) and assume is_clang is true, for
consistency with ocmock/BUILD.gn
* Remove a duplicate -Wno-return-type flag
No intended behavior change.
BUG=none
Review URL: https://codereview.chromium.org/1559873002
Cr-Commit-Position: refs/heads/master@{#367354}
-rw-r--r-- | third_party/mach_override/BUILD.gn | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/third_party/mach_override/BUILD.gn b/third_party/mach_override/BUILD.gn index ed1c331..61af526 100644 --- a/third_party/mach_override/BUILD.gn +++ b/third_party/mach_override/BUILD.gn @@ -2,17 +2,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +assert(is_mac || is_ios) + 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", + 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", - ] - } + # Fires once in decode.c. + "-Wno-sometimes-uninitialized", + ] } static_library("libudis86") { @@ -38,21 +38,18 @@ static_library("libudis86") { "HAVE_STRING_H", ] - # syn.c doesn't specify a return value when it issues an assertion. - cflags = [ "-Wno-return-type" ] + configs -= [ + "//build/config/compiler:chromium_code", - configs -= [ "//build/config/compiler:chromium_code" ] + # For UD_ASSERT(!"message"); + "//build/config/clang:extra_warnings", + ] 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"); - configs -= [ "//build/config/clang:extra_warnings" ] - } } static_library("mach_override") { |