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
diff --git a/cc/linker.go b/cc/linker.go
index 13df232..a712391 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -479,9 +479,9 @@
}
if linker.useClangLld(ctx) {
- flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.ClangLldflags())
+ flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.Lldflags())
} else {
- flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.ClangLdflags())
+ flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.Ldflags())
}
if !ctx.toolchain().Bionic() && !ctx.Fuchsia() {
@@ -535,7 +535,7 @@
flags.Global.LdFlags = append(flags.Global.LdFlags, "-Wl,--hash-style=both")
}
- flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.ToolchainClangLdflags())
+ flags.Global.LdFlags = append(flags.Global.LdFlags, toolchain.ToolchainLdflags())
if Bool(linker.Properties.Group_static_libs) {
flags.GroupStaticLibs = true