Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7eedfe00 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 21738f60 98ab3117
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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":
			if !flags.assemblerWithCpp {
				rule = ccNoDeps
			}
			fallthrough
		case ".S":
			ccCmd = "clang"
+5 −1
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ type Flags struct {
	CFlagsDeps  android.Paths // Files depended on by compiler flags
	LdFlagsDeps android.Paths // Files depended on by linker flags

	AssemblerWithCpp bool
	GroupStaticLibs  bool

	proto            android.ProtoFlags
@@ -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, " "))
+2 −1
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ func flagsToBuilderFlags(in Flags) builderFlags {

		systemIncludeFlags: strings.Join(in.SystemIncludeFlags, " "),

		assemblerWithCpp: in.AssemblerWithCpp,
		groupStaticLibs:  in.GroupStaticLibs,

		proto:            in.proto,