Merge "Switch to clang-r399163."
This commit is contained in:
@@ -42,7 +42,6 @@ var ClangUnknownCflags = sorted([]string{
|
|||||||
"-Wno-literal-suffix",
|
"-Wno-literal-suffix",
|
||||||
"-Wno-maybe-uninitialized",
|
"-Wno-maybe-uninitialized",
|
||||||
"-Wno-old-style-declaration",
|
"-Wno-old-style-declaration",
|
||||||
"-Wno-psabi",
|
|
||||||
"-Wno-unused-but-set-parameter",
|
"-Wno-unused-but-set-parameter",
|
||||||
"-Wno-unused-but-set-variable",
|
"-Wno-unused-but-set-variable",
|
||||||
"-Wno-unused-local-typedefs",
|
"-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
|
// 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
|
// become more strict, or if they are a new match for a wildcard group like
|
||||||
// `modernize-*`.
|
// `modernize-*`.
|
||||||
var ClangTidyDisableChecks = []string{}
|
var ClangTidyDisableChecks = []string{
|
||||||
|
"misc-no-recursion",
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{
|
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.
|
// not emit the table by default on Android since NDK still uses GNU binutils.
|
||||||
"-faddrsig",
|
"-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.
|
// Help catch common 32/64-bit errors.
|
||||||
"-Werror=int-conversion",
|
"-Werror=int-conversion",
|
||||||
|
|
||||||
@@ -183,6 +188,8 @@ func init() {
|
|||||||
"-Wno-enum-enum-conversion", // http://b/154138986
|
"-Wno-enum-enum-conversion", // http://b/154138986
|
||||||
"-Wno-enum-float-conversion", // http://b/154255917
|
"-Wno-enum-float-conversion", // http://b/154255917
|
||||||
"-Wno-pessimizing-move", // http://b/154270751
|
"-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
|
// Extra cflags for external third-party projects to disable warnings that
|
||||||
@@ -205,6 +212,9 @@ func init() {
|
|||||||
"-Wno-xor-used-as-pow",
|
"-Wno-xor-used-as-pow",
|
||||||
// http://b/145211022
|
// http://b/145211022
|
||||||
"-Wno-final-dtor-non-final-class",
|
"-Wno-final-dtor-non-final-class",
|
||||||
|
|
||||||
|
// http://b/165945989
|
||||||
|
"-Wno-psabi",
|
||||||
}, " "))
|
}, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -114,6 +114,12 @@ var (
|
|||||||
noOverrideGlobalCflags = []string{
|
noOverrideGlobalCflags = []string{
|
||||||
"-Werror=int-to-pointer-cast",
|
"-Werror=int-to-pointer-cast",
|
||||||
"-Werror=pointer-to-int-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",
|
"-Werror=fortify-source",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,8 +134,8 @@ var (
|
|||||||
|
|
||||||
// prebuilts/clang default settings.
|
// prebuilts/clang default settings.
|
||||||
ClangDefaultBase = "prebuilts/clang/host"
|
ClangDefaultBase = "prebuilts/clang/host"
|
||||||
ClangDefaultVersion = "clang-r383902b"
|
ClangDefaultVersion = "clang-r399163"
|
||||||
ClangDefaultShortVersion = "11.0.2"
|
ClangDefaultShortVersion = "11.0.4"
|
||||||
|
|
||||||
// Directories with warnings from Android.bp files.
|
// Directories with warnings from Android.bp files.
|
||||||
WarningAllowedProjects = []string{
|
WarningAllowedProjects = []string{
|
||||||
|
@@ -39,6 +39,9 @@ var (
|
|||||||
// Get 64-bit off_t and related functions.
|
// Get 64-bit off_t and related functions.
|
||||||
"-D_FILE_OFFSET_BITS=64",
|
"-D_FILE_OFFSET_BITS=64",
|
||||||
|
|
||||||
|
// Don't adjust the layout of bitfields like msvc does.
|
||||||
|
"-mno-ms-bitfields",
|
||||||
|
|
||||||
"--sysroot ${WindowsGccRoot}/${WindowsGccTriple}",
|
"--sysroot ${WindowsGccRoot}/${WindowsGccTriple}",
|
||||||
}
|
}
|
||||||
windowsClangCflags = append(ClangFilterUnknownCflags(windowsCflags), []string{}...)
|
windowsClangCflags = append(ClangFilterUnknownCflags(windowsCflags), []string{}...)
|
||||||
|
Reference in New Issue
Block a user