Merge "Switch to clang-r399163."

This commit is contained in:
Stephen Hines 2020-09-22 16:40:02 +00:00 committed by Gerrit Code Review
commit c5a0e64d82
3 changed files with 23 additions and 4 deletions

View File

@ -42,7 +42,6 @@ var ClangUnknownCflags = sorted([]string{
"-Wno-literal-suffix",
"-Wno-maybe-uninitialized",
"-Wno-old-style-declaration",
"-Wno-psabi",
"-Wno-unused-but-set-parameter",
"-Wno-unused-but-set-variable",
"-Wno-unused-local-typedefs",
@ -93,7 +92,9 @@ var ClangLibToolingUnknownCflags = sorted([]string{})
// updated, some checks enabled by this module may be disabled if they have
// become more strict, or if they are a new match for a wildcard group like
// `modernize-*`.
var ClangTidyDisableChecks = []string{}
var ClangTidyDisableChecks = []string{
"misc-no-recursion",
}
func init() {
pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{
@ -103,6 +104,10 @@ func init() {
// not emit the table by default on Android since NDK still uses GNU binutils.
"-faddrsig",
// Turn on -fcommon explicitly, since Clang now defaults to -fno-common. The cleanup bug
// tracking this is http://b/151457797.
"-fcommon",
// Help catch common 32/64-bit errors.
"-Werror=int-conversion",
@ -183,6 +188,8 @@ func init() {
"-Wno-enum-enum-conversion", // http://b/154138986
"-Wno-enum-float-conversion", // http://b/154255917
"-Wno-pessimizing-move", // http://b/154270751
// New warnings to be fixed after clang-r399163
"-Wno-non-c-typedef-for-linkage", // http://b/161304145
}, " "))
// Extra cflags for external third-party projects to disable warnings that
@ -205,6 +212,9 @@ func init() {
"-Wno-xor-used-as-pow",
// http://b/145211022
"-Wno-final-dtor-non-final-class",
// http://b/165945989
"-Wno-psabi",
}, " "))
}

View File

@ -114,6 +114,12 @@ var (
noOverrideGlobalCflags = []string{
"-Werror=int-to-pointer-cast",
"-Werror=pointer-to-int-cast",
// http://b/161386391 for -Wno-void-pointer-to-enum-cast
"-Wno-void-pointer-to-enum-cast",
// http://b/161386391 for -Wno-void-pointer-to-int-cast
"-Wno-void-pointer-to-int-cast",
// http://b/161386391 for -Wno-pointer-to-int-cast
"-Wno-pointer-to-int-cast",
"-Werror=fortify-source",
}
@ -128,8 +134,8 @@ var (
// prebuilts/clang default settings.
ClangDefaultBase = "prebuilts/clang/host"
ClangDefaultVersion = "clang-r383902b"
ClangDefaultShortVersion = "11.0.2"
ClangDefaultVersion = "clang-r399163"
ClangDefaultShortVersion = "11.0.4"
// Directories with warnings from Android.bp files.
WarningAllowedProjects = []string{

View File

@ -39,6 +39,9 @@ var (
// Get 64-bit off_t and related functions.
"-D_FILE_OFFSET_BITS=64",
// Don't adjust the layout of bitfields like msvc does.
"-mno-ms-bitfields",
"--sysroot ${WindowsGccRoot}/${WindowsGccTriple}",
}
windowsClangCflags = append(ClangFilterUnknownCflags(windowsCflags), []string{}...)