Merge "Revert "Enforce that output files are created in primary ninja execution"" into main
This commit is contained in:
@@ -99,10 +99,9 @@ type configImpl struct {
|
|||||||
// Autodetected
|
// Autodetected
|
||||||
totalRAM uint64
|
totalRAM uint64
|
||||||
|
|
||||||
brokenDupRules bool
|
brokenDupRules bool
|
||||||
brokenUsesNetwork bool
|
brokenUsesNetwork bool
|
||||||
brokenNinjaEnvVars []string
|
brokenNinjaEnvVars []string
|
||||||
brokenMissingOutputs bool
|
|
||||||
|
|
||||||
pathReplaced bool
|
pathReplaced bool
|
||||||
|
|
||||||
@@ -1609,14 +1608,6 @@ func (c *configImpl) BuildBrokenNinjaUsesEnvVars() []string {
|
|||||||
return c.brokenNinjaEnvVars
|
return c.brokenNinjaEnvVars
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) SetBuildBrokenMissingOutputs(val bool) {
|
|
||||||
c.brokenMissingOutputs = val
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) BuildBrokenMissingOutputs() bool {
|
|
||||||
return c.brokenMissingOutputs
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) SetTargetDeviceDir(dir string) {
|
func (c *configImpl) SetTargetDeviceDir(dir string) {
|
||||||
c.targetDeviceDir = dir
|
c.targetDeviceDir = dir
|
||||||
}
|
}
|
||||||
|
@@ -235,11 +235,6 @@ func runMakeProductConfig(ctx Context, config Config) {
|
|||||||
"BUILD_BROKEN_SRC_DIR_IS_WRITABLE",
|
"BUILD_BROKEN_SRC_DIR_IS_WRITABLE",
|
||||||
"BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST",
|
"BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST",
|
||||||
|
|
||||||
// Whether missing outputs should be treated as warnings
|
|
||||||
// instead of errors.
|
|
||||||
// `true` will relegate missing outputs to warnings.
|
|
||||||
"BUILD_BROKEN_MISSING_OUTPUTS",
|
|
||||||
|
|
||||||
// Not used, but useful to be in the soong.log
|
// Not used, but useful to be in the soong.log
|
||||||
"TARGET_BUILD_TYPE",
|
"TARGET_BUILD_TYPE",
|
||||||
"HOST_ARCH",
|
"HOST_ARCH",
|
||||||
@@ -306,5 +301,4 @@ func runMakeProductConfig(ctx Context, config Config) {
|
|||||||
config.SetBuildBrokenUsesNetwork(makeVars["BUILD_BROKEN_USES_NETWORK"] == "true")
|
config.SetBuildBrokenUsesNetwork(makeVars["BUILD_BROKEN_USES_NETWORK"] == "true")
|
||||||
config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(makeVars["BUILD_BROKEN_NINJA_USES_ENV_VARS"]))
|
config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(makeVars["BUILD_BROKEN_NINJA_USES_ENV_VARS"]))
|
||||||
config.SetSourceRootDirs(strings.Fields(makeVars["PRODUCT_SOURCE_ROOT_DIRS"]))
|
config.SetSourceRootDirs(strings.Fields(makeVars["PRODUCT_SOURCE_ROOT_DIRS"]))
|
||||||
config.SetBuildBrokenMissingOutputs(makeVars["BUILD_BROKEN_MISSING_OUTPUTS"] == "true")
|
|
||||||
}
|
}
|
||||||
|
@@ -77,14 +77,6 @@ func runNinjaForBuild(ctx Context, config Config) {
|
|||||||
"-w", "dupbuild=err",
|
"-w", "dupbuild=err",
|
||||||
"-w", "missingdepfile=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...)
|
cmd := Command(ctx, config, "ninja", executable, args...)
|
||||||
|
|
||||||
// Set up the nsjail sandbox Ninja runs in.
|
// Set up the nsjail sandbox Ninja runs in.
|
||||||
|
Reference in New Issue
Block a user