Merge "volatile-status.txt to be translated to an order-only dep in build.ninja" am: 3caa38827c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2313559 Change-Id: I53e91cdc7cae562eb8289db689a4af8a57e0d8e0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
91621346e3
@@ -1050,18 +1050,26 @@ func (c *bazelSingleton) GenerateBuildActions(ctx SingletonContext) {
|
|||||||
|
|
||||||
for _, depset := range ctx.Config().BazelContext.AqueryDepsets() {
|
for _, depset := range ctx.Config().BazelContext.AqueryDepsets() {
|
||||||
var outputs []Path
|
var outputs []Path
|
||||||
|
var orderOnlies []Path
|
||||||
for _, depsetDepHash := range depset.TransitiveDepSetHashes {
|
for _, depsetDepHash := range depset.TransitiveDepSetHashes {
|
||||||
otherDepsetName := bazelDepsetName(depsetDepHash)
|
otherDepsetName := bazelDepsetName(depsetDepHash)
|
||||||
outputs = append(outputs, PathForPhony(ctx, otherDepsetName))
|
outputs = append(outputs, PathForPhony(ctx, otherDepsetName))
|
||||||
}
|
}
|
||||||
for _, artifactPath := range depset.DirectArtifacts {
|
for _, artifactPath := range depset.DirectArtifacts {
|
||||||
outputs = append(outputs, PathForBazelOut(ctx, artifactPath))
|
pathInBazelOut := PathForBazelOut(ctx, artifactPath)
|
||||||
|
if artifactPath == "bazel-out/volatile-status.txt" {
|
||||||
|
// See https://bazel.build/docs/user-manual#workspace-status
|
||||||
|
orderOnlies = append(orderOnlies, pathInBazelOut)
|
||||||
|
} else {
|
||||||
|
outputs = append(outputs, pathInBazelOut)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
thisDepsetName := bazelDepsetName(depset.ContentHash)
|
thisDepsetName := bazelDepsetName(depset.ContentHash)
|
||||||
ctx.Build(pctx, BuildParams{
|
ctx.Build(pctx, BuildParams{
|
||||||
Rule: blueprint.Phony,
|
Rule: blueprint.Phony,
|
||||||
Outputs: []WritablePath{PathForPhony(ctx, thisDepsetName)},
|
Outputs: []WritablePath{PathForPhony(ctx, thisDepsetName)},
|
||||||
Implicits: outputs,
|
Implicits: outputs,
|
||||||
|
OrderOnly: orderOnlies,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user