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:
@@ -392,7 +392,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
if flags.RequiredInstructionSet != "" {
|
||||
instructionSet = flags.RequiredInstructionSet
|
||||
}
|
||||
instructionSetFlags, err := tc.ClangInstructionSetFlags(instructionSet)
|
||||
instructionSetFlags, err := tc.InstructionSetFlags(instructionSet)
|
||||
if err != nil {
|
||||
ctx.ModuleErrorf("%s", err)
|
||||
}
|
||||
@@ -437,10 +437,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
flags.Global.ConlyFlags = append([]string{"${config.CommonGlobalConlyflags}"}, flags.Global.ConlyFlags...)
|
||||
flags.Global.CppFlags = append([]string{fmt.Sprintf("${config.%sGlobalCppflags}", hod)}, flags.Global.CppFlags...)
|
||||
|
||||
flags.Global.AsFlags = append(flags.Global.AsFlags, tc.ClangAsflags())
|
||||
flags.Global.AsFlags = append(flags.Global.AsFlags, tc.Asflags())
|
||||
flags.Global.CppFlags = append([]string{"${config.CommonClangGlobalCppflags}"}, flags.Global.CppFlags...)
|
||||
flags.Global.CommonFlags = append(flags.Global.CommonFlags,
|
||||
tc.ClangCflags(),
|
||||
tc.Cflags(),
|
||||
"${config.CommonClangGlobalCflags}",
|
||||
fmt.Sprintf("${config.%sClangGlobalCflags}", hod))
|
||||
|
||||
@@ -458,11 +458,11 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
|
||||
flags.Global.AsFlags = append(flags.Global.AsFlags, "-D__ASSEMBLY__")
|
||||
|
||||
flags.Global.CppFlags = append(flags.Global.CppFlags, tc.ClangCppflags())
|
||||
flags.Global.CppFlags = append(flags.Global.CppFlags, tc.Cppflags())
|
||||
|
||||
flags.Global.YasmFlags = append(flags.Global.YasmFlags, tc.YasmFlags())
|
||||
|
||||
flags.Global.CommonFlags = append(flags.Global.CommonFlags, tc.ToolchainClangCflags())
|
||||
flags.Global.CommonFlags = append(flags.Global.CommonFlags, tc.ToolchainCflags())
|
||||
|
||||
cStd := config.CStdVersion
|
||||
if String(compiler.Properties.C_std) == "experimental" {
|
||||
|
Reference in New Issue
Block a user