Add implicit outputs to link actions
Change-Id: I9b6ae97f5bbfe8f9c4b9c089544a768982794f32 Bug: b/154733231 Test: Built the failing action with / without this change
This commit is contained in:
@@ -71,10 +71,10 @@ var (
|
||||
ExecStrategy: "${config.RECXXLinksExecStrategy}",
|
||||
Inputs: []string{"${out}.rsp"},
|
||||
RSPFile: "${out}.rsp",
|
||||
OutputFiles: []string{"${out}"},
|
||||
OutputFiles: []string{"${out}", "$implicitOutputs"},
|
||||
ToolchainInputs: []string{"$ldCmd"},
|
||||
Platform: map[string]string{remoteexec.PoolKey: "${config.RECXXLinksPool}"},
|
||||
}, []string{"ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags", "extraLibFlags"}, nil)
|
||||
}, []string{"ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags", "extraLibFlags"}, []string{"implicitOutputs"})
|
||||
|
||||
partialLd, partialLdRE = remoteexec.StaticRules(pctx, "partialLd",
|
||||
blueprint.RuleParams{
|
||||
@@ -83,13 +83,12 @@ var (
|
||||
Command: "$reTemplate$ldCmd -fuse-ld=lld -nostdlib -no-pie -Wl,-r ${in} -o ${out} ${ldFlags}",
|
||||
CommandDeps: []string{"$ldCmd"},
|
||||
}, &remoteexec.REParams{
|
||||
Labels: map[string]string{"type": "link", "tool": "clang"},
|
||||
ExecStrategy: "${config.RECXXLinksExecStrategy}",
|
||||
Inputs: []string{"$inCommaList"},
|
||||
OutputFiles: []string{"${out}"},
|
||||
Labels: map[string]string{"type": "link", "tool": "clang"},
|
||||
ExecStrategy: "${config.RECXXLinksExecStrategy}", Inputs: []string{"$inCommaList"},
|
||||
OutputFiles: []string{"${out}", "$implicitOutputs"},
|
||||
ToolchainInputs: []string{"$ldCmd"},
|
||||
Platform: map[string]string{remoteexec.PoolKey: "${config.RECXXLinksPool}"},
|
||||
}, []string{"ldCmd", "ldFlags"}, []string{"inCommaList"})
|
||||
}, []string{"ldCmd", "ldFlags"}, []string{"inCommaList", "implicitOutputs"})
|
||||
|
||||
ar = pctx.AndroidStaticRule("ar",
|
||||
blueprint.RuleParams{
|
||||
@@ -676,8 +675,17 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
||||
}
|
||||
|
||||
rule := ld
|
||||
args := map[string]string{
|
||||
"ldCmd": ldCmd,
|
||||
"crtBegin": crtBegin.String(),
|
||||
"libFlags": strings.Join(libFlagsList, " "),
|
||||
"extraLibFlags": flags.extraLibFlags,
|
||||
"ldFlags": flags.globalLdFlags + " " + flags.localLdFlags,
|
||||
"crtEnd": crtEnd.String(),
|
||||
}
|
||||
if ctx.Config().IsEnvTrue("RBE_CXX_LINKS") {
|
||||
rule = ldRE
|
||||
args["implicitOutputs"] = strings.Join(implicitOutputs.Strings(), ",")
|
||||
}
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
@@ -687,14 +695,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
||||
ImplicitOutputs: implicitOutputs,
|
||||
Inputs: objFiles,
|
||||
Implicits: deps,
|
||||
Args: map[string]string{
|
||||
"ldCmd": ldCmd,
|
||||
"crtBegin": crtBegin.String(),
|
||||
"libFlags": strings.Join(libFlagsList, " "),
|
||||
"extraLibFlags": flags.extraLibFlags,
|
||||
"ldFlags": flags.globalLdFlags + " " + flags.localLdFlags,
|
||||
"crtEnd": crtEnd.String(),
|
||||
},
|
||||
Args: args,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user