GN: detect is_clang, use it to switch Clang to warning blacklist.
Same as the last CL, now with -Wno-over-aligned. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369033002 TBR=bungeman@google.com NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2369033002
This commit is contained in:
parent
85552e4f9d
commit
f347c51226
75
gn/BUILD.gn
75
gn/BUILD.gn
@ -24,6 +24,13 @@ declare_args() {
|
||||
cc_wrapper = ""
|
||||
}
|
||||
|
||||
is_clang = exec_script("is_clang.py",
|
||||
[
|
||||
cc,
|
||||
cxx,
|
||||
],
|
||||
"value")
|
||||
|
||||
config("default") {
|
||||
asmflags = []
|
||||
cflags = []
|
||||
@ -70,6 +77,74 @@ config("default") {
|
||||
|
||||
"-Wnon-virtual-dtor",
|
||||
]
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"-Weverything",
|
||||
"-Wno-unknown-warning-option", # Let older Clangs ignore newer Clangs' warnings.
|
||||
]
|
||||
|
||||
# High priority to fix!
|
||||
cflags += [
|
||||
"-Wno-comma",
|
||||
"-Wno-conditional-uninitialized",
|
||||
"-Wno-covered-switch-default",
|
||||
"-Wno-deprecated",
|
||||
"-Wno-format-nonliteral",
|
||||
"-Wno-over-aligned",
|
||||
"-Wno-shadow",
|
||||
"-Wno-shift-sign-overflow",
|
||||
"-Wno-undefined-func-template",
|
||||
"-Wno-undefined-reinterpret-cast",
|
||||
]
|
||||
|
||||
cflags += [
|
||||
"-Wno-cast-align",
|
||||
"-Wno-class-varargs",
|
||||
"-Wno-conversion",
|
||||
"-Wno-disabled-macro-expansion",
|
||||
"-Wno-documentation",
|
||||
"-Wno-documentation-unknown-command",
|
||||
"-Wno-double-promotion",
|
||||
"-Wno-exit-time-destructors", # TODO: OK outside libskia
|
||||
"-Wno-extra-semi",
|
||||
"-Wno-float-conversion",
|
||||
"-Wno-float-equal",
|
||||
"-Wno-global-constructors", # TODO: OK outside libskia
|
||||
"-Wno-gnu-anonymous-struct",
|
||||
"-Wno-gnu-zero-variadic-macro-arguments",
|
||||
"-Wno-missing-prototypes",
|
||||
"-Wno-missing-variable-declarations",
|
||||
"-Wno-nested-anon-types",
|
||||
"-Wno-newline-eof",
|
||||
"-Wno-pedantic",
|
||||
"-Wno-reserved-id-macro",
|
||||
"-Wno-sign-conversion",
|
||||
"-Wno-switch-enum",
|
||||
"-Wno-undef",
|
||||
"-Wno-unreachable-code",
|
||||
"-Wno-unreachable-code-break",
|
||||
"-Wno-unreachable-code-return",
|
||||
"-Wno-unused-macros",
|
||||
"-Wno-unused-member-function",
|
||||
]
|
||||
cflags_cc += [
|
||||
"-Wno-abstract-vbase-init",
|
||||
"-Wno-range-loop-analysis",
|
||||
"-Wno-weak-vtables",
|
||||
]
|
||||
|
||||
# We are unlikely to want to fix these.
|
||||
cflags += [
|
||||
"-Wno-implicit-fallthrough",
|
||||
"-Wno-missing-noreturn",
|
||||
"-Wno-old-style-cast",
|
||||
"-Wno-padded",
|
||||
]
|
||||
cflags_cc += [
|
||||
"-Wno-c++98-compat",
|
||||
"-Wno-c++98-compat-pedantic",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (current_cpu == "arm") {
|
||||
|
17
gn/is_clang.py
Executable file
17
gn/is_clang.py
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
cc,cxx = sys.argv[1:3]
|
||||
|
||||
if ('clang' in subprocess.check_output([cc, '--version']) and
|
||||
'clang' in subprocess.check_output([cxx, '--version'])):
|
||||
print 'true'
|
||||
else:
|
||||
print 'false'
|
||||
|
Loading…
Reference in New Issue
Block a user