Remove clang indirection, affects command line ordering
Move the last clang-specific list into the common global list. This affects the command line flag ordering due to the the -fdebug-prefix-map= flag that is added by an init() function, which will force every native rule to recompile. Bug: 68947919 Test: m checkbuild Change-Id: Ic2509e61e9555e9483b92a18d7e8d9913b7125cc
This commit is contained in:
@@ -92,64 +92,6 @@ var ClangTidyDisableChecks = []string{
|
||||
"readability-function-cognitive-complexity", // http://b/175055536
|
||||
}
|
||||
|
||||
func init() {
|
||||
exportStringListStaticVariable("ClangExtraCflags", []string{
|
||||
"-D__compiler_offsetof=__builtin_offsetof",
|
||||
|
||||
// Emit address-significance table which allows linker to perform safe ICF. Clang does
|
||||
// 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",
|
||||
|
||||
// Enable the new pass manager.
|
||||
"-fexperimental-new-pass-manager",
|
||||
|
||||
// Disable overly aggressive warning for macros defined with a leading underscore
|
||||
// This happens in AndroidConfig.h, which is included nearly everywhere.
|
||||
// TODO: can we remove this now?
|
||||
"-Wno-reserved-id-macro",
|
||||
|
||||
// Workaround for ccache with clang.
|
||||
// See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html.
|
||||
"-Wno-unused-command-line-argument",
|
||||
|
||||
// Force clang to always output color diagnostics. Ninja will strip the ANSI
|
||||
// color codes if it is not running in a terminal.
|
||||
"-fcolor-diagnostics",
|
||||
|
||||
// Warnings from clang-7.0
|
||||
"-Wno-sign-compare",
|
||||
|
||||
// Warnings from clang-8.0
|
||||
"-Wno-defaulted-function-deleted",
|
||||
|
||||
// Disable -Winconsistent-missing-override until we can clean up the existing
|
||||
// codebase for it.
|
||||
"-Wno-inconsistent-missing-override",
|
||||
|
||||
// Warnings from clang-10
|
||||
// Nested and array designated initialization is nice to have.
|
||||
"-Wno-c99-designator",
|
||||
|
||||
// Warnings from clang-12
|
||||
"-Wno-gnu-folding-constant",
|
||||
|
||||
// Calls to the APIs that are newer than the min sdk version of the caller should be
|
||||
// guarded with __builtin_available.
|
||||
"-Wunguarded-availability",
|
||||
// This macro allows the bionic versioning.h to indirectly determine whether the
|
||||
// option -Wunguarded-availability is on or not.
|
||||
"-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func ClangFilterUnknownCflags(cflags []string) []string {
|
||||
result, _ := android.FilterList(cflags, ClangUnknownCflags)
|
||||
return result
|
||||
|
Reference in New Issue
Block a user