Enforce that output files are created in primary ninja execution
Missing output files in ninja execution will be treated as errors. Products can bypass this using the newly introduced BUILD_BROKEN_MISSING_OUTPUTS flag. Test: m nothing # verified missingoutfile appears in out/soong.log Test: checkbuild passes on presubmits Change-Id: I4eebcd08aa57fc6ccf1688c32e0d1fe06d66ab9a
This commit is contained in:
@@ -77,6 +77,14 @@ func runNinjaForBuild(ctx Context, config Config) {
|
||||
"-w", "dupbuild=err",
|
||||
"-w", "missingdepfile=err")
|
||||
|
||||
if !config.BuildBrokenMissingOutputs() {
|
||||
// Missing outputs will be treated as errors.
|
||||
// BUILD_BROKEN_MISSING_OUTPUTS can be used to bypass this check.
|
||||
args = append(args,
|
||||
"-w", "missingoutfile=err",
|
||||
)
|
||||
}
|
||||
|
||||
cmd := Command(ctx, config, "ninja", executable, args...)
|
||||
|
||||
// Set up the nsjail sandbox Ninja runs in.
|
||||
|
Reference in New Issue
Block a user