Merge "Save deps when asflags contains -xassembler-with-cpp"

am: 7eedfe00e7

Change-Id: Iecedb5679553bdf39c393c76e218da277b6bb8a1
This commit is contained in:
Dan Willemsen 2019-08-28 13:12:01 -07:00 committed by android-build-merger
commit ba23aa723b
3 changed files with 12 additions and 3 deletions

View File

@ -271,6 +271,8 @@ type builderFlags struct {
sAbiDump bool
emitXrefs bool
assemblerWithCpp bool
systemIncludeFlags string
groupStaticLibs bool
@ -428,7 +430,9 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
switch srcFile.Ext() {
case ".s":
rule = ccNoDeps
if !flags.assemblerWithCpp {
rule = ccNoDeps
}
fallthrough
case ".S":
ccCmd = "clang"

View File

@ -174,7 +174,8 @@ type Flags struct {
CFlagsDeps android.Paths // Files depended on by compiler flags
LdFlagsDeps android.Paths // Files depended on by linker flags
GroupStaticLibs bool
AssemblerWithCpp bool
GroupStaticLibs bool
proto android.ProtoFlags
protoC bool // Whether to use C instead of C++
@ -1053,6 +1054,9 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
if c.sabi != nil {
flags = c.sabi.flags(ctx, flags)
}
flags.AssemblerWithCpp = inList("-xassembler-with-cpp", flags.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.CFlags, " "))

View File

@ -79,7 +79,8 @@ func flagsToBuilderFlags(in Flags) builderFlags {
systemIncludeFlags: strings.Join(in.SystemIncludeFlags, " "),
groupStaticLibs: in.GroupStaticLibs,
assemblerWithCpp: in.AssemblerWithCpp,
groupStaticLibs: in.GroupStaticLibs,
proto: in.proto,
protoC: in.protoC,