Merge "Share cFlags, tidyFlags, etc. in a module" am: b1a12462a9

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824024

Change-Id: Iaf6050178f9d172a5a17103504e8f081277df9cf
This commit is contained in:
Treehugger Robot
2021-09-16 02:35:38 +00:00
committed by Automerger Merge Worker
4 changed files with 71 additions and 22 deletions

View File

@@ -1814,15 +1814,6 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
flags.AssemblerWithCpp = inList("-xassembler-with-cpp", flags.Local.AsFlags)
// Optimization to reduce size of build.ninja
// Replace the long list of flags for each file with a module-local variable
ctx.Variable(pctx, "cflags", strings.Join(flags.Local.CFlags, " "))
ctx.Variable(pctx, "cppflags", strings.Join(flags.Local.CppFlags, " "))
ctx.Variable(pctx, "asflags", strings.Join(flags.Local.AsFlags, " "))
flags.Local.CFlags = []string{"$cflags"}
flags.Local.CppFlags = []string{"$cppflags"}
flags.Local.AsFlags = []string{"$asflags"}
var objs Objects
if c.compiler != nil {
objs = c.compiler.compile(ctx, flags, deps)