Remove clang indirection without affecting build.ninja

Remove cflags that are not handled by clang from the global defaults,
and remove calls to ClangFilterUnknownCflags.

Squash lists of clang-specific default flags into the main default
flags lists.

Rename Toolchain.Clang*flags to Toolchain.*flags.

Rename Go variables with Clang in the name that have no non-Clang
equivalent.

Remove unused ninja variables.

Bug: 68947919
Test: no change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_crosshatch-userdebug
Change-Id: Id287945315d53e5eaef197adbbb4f1302f2e3680
This commit is contained in:
Colin Cross
2021-07-14 17:03:16 -07:00
parent 1c19b81e3d
commit 33bac24bb9
19 changed files with 234 additions and 355 deletions

View File

@@ -80,12 +80,6 @@ var ClangUnknownCflags = sorted([]string{
"--enable-stdcall-fixup",
})
// Ldflags that should be filtered out when linking with clang lld
var ClangUnknownLldflags = sorted([]string{
"-Wl,--fix-cortex-a8",
"-Wl,--no-fix-cortex-a8",
})
var ClangLibToolingUnknownCflags = sorted([]string{})
// List of tidy checks that should be disabled globally. When the compiler is
@@ -255,26 +249,10 @@ func ClangRewriteTidyChecks(checks []string) []string {
return result
}
func ClangFilterUnknownLldflags(lldflags []string) []string {
result, _ := android.FilterList(lldflags, ClangUnknownLldflags)
return result
}
func ClangLibToolingFilterUnknownCflags(libToolingFlags []string) []string {
return android.RemoveListFromList(libToolingFlags, ClangLibToolingUnknownCflags)
}
func inListSorted(s string, list []string) bool {
for _, l := range list {
if s == l {
return true
} else if s < l {
return false
}
}
return false
}
func sorted(list []string) []string {
sort.Strings(list)
return list