Merge "Revert "Add a coverage suffix to avoid Ninja file regeneration."" into main
This commit is contained in:
@@ -1041,7 +1041,7 @@ func (c *configImpl) NamedGlobFile(name string) string {
|
|||||||
|
|
||||||
func (c *configImpl) UsedEnvFile(tag string) string {
|
func (c *configImpl) UsedEnvFile(tag string) string {
|
||||||
if v, ok := c.environ.Get("TARGET_PRODUCT"); ok {
|
if v, ok := c.environ.Get("TARGET_PRODUCT"); ok {
|
||||||
return shared.JoinPath(c.SoongOutDir(), usedEnvFile+"."+v+c.CoverageSuffix()+"."+tag)
|
return shared.JoinPath(c.SoongOutDir(), usedEnvFile+"."+v+"."+tag)
|
||||||
}
|
}
|
||||||
return shared.JoinPath(c.SoongOutDir(), usedEnvFile+"."+tag)
|
return shared.JoinPath(c.SoongOutDir(), usedEnvFile+"."+tag)
|
||||||
}
|
}
|
||||||
@@ -1149,13 +1149,6 @@ func (c *configImpl) TargetProductOrErr() (string, error) {
|
|||||||
return "", fmt.Errorf("TARGET_PRODUCT is not defined")
|
return "", fmt.Errorf("TARGET_PRODUCT is not defined")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) CoverageSuffix() string {
|
|
||||||
if v := c.environ.IsEnvTrue("EMMA_INSTRUMENT"); v {
|
|
||||||
return ".coverage"
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) TargetDevice() string {
|
func (c *configImpl) TargetDevice() string {
|
||||||
return c.targetDevice
|
return c.targetDevice
|
||||||
}
|
}
|
||||||
@@ -1527,7 +1520,7 @@ func (c *configImpl) SoongVarsFile() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return filepath.Join(c.SoongOutDir(), "soong.variables")
|
return filepath.Join(c.SoongOutDir(), "soong.variables")
|
||||||
} else {
|
} else {
|
||||||
return filepath.Join(c.SoongOutDir(), "soong."+targetProduct+c.CoverageSuffix()+".variables")
|
return filepath.Join(c.SoongOutDir(), "soong."+targetProduct+".variables")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1536,7 +1529,7 @@ func (c *configImpl) SoongExtraVarsFile() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return filepath.Join(c.SoongOutDir(), "soong.extra.variables")
|
return filepath.Join(c.SoongOutDir(), "soong.extra.variables")
|
||||||
} else {
|
} else {
|
||||||
return filepath.Join(c.SoongOutDir(), "soong."+targetProduct+c.CoverageSuffix()+".extra.variables")
|
return filepath.Join(c.SoongOutDir(), "soong."+targetProduct+".extra.variables")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1545,7 +1538,7 @@ func (c *configImpl) SoongNinjaFile() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return filepath.Join(c.SoongOutDir(), "build.ninja")
|
return filepath.Join(c.SoongOutDir(), "build.ninja")
|
||||||
} else {
|
} else {
|
||||||
return filepath.Join(c.SoongOutDir(), "build."+targetProduct+c.CoverageSuffix()+".ninja")
|
return filepath.Join(c.SoongOutDir(), "build."+targetProduct+".ninja")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1557,11 +1550,11 @@ func (c *configImpl) CombinedNinjaFile() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) SoongAndroidMk() string {
|
func (c *configImpl) SoongAndroidMk() string {
|
||||||
return filepath.Join(c.SoongOutDir(), "Android-"+c.TargetProduct()+c.CoverageSuffix()+".mk")
|
return filepath.Join(c.SoongOutDir(), "Android-"+c.TargetProduct()+".mk")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) SoongMakeVarsMk() string {
|
func (c *configImpl) SoongMakeVarsMk() string {
|
||||||
return filepath.Join(c.SoongOutDir(), "make_vars-"+c.TargetProduct()+c.CoverageSuffix()+".mk")
|
return filepath.Join(c.SoongOutDir(), "make_vars-"+c.TargetProduct()+".mk")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) SoongBuildMetrics() string {
|
func (c *configImpl) SoongBuildMetrics() string {
|
||||||
|
@@ -41,7 +41,7 @@ const katiPackageSuffix = "-package"
|
|||||||
// arguments.
|
// arguments.
|
||||||
func genKatiSuffix(ctx Context, config Config) {
|
func genKatiSuffix(ctx Context, config Config) {
|
||||||
// Construct the base suffix.
|
// Construct the base suffix.
|
||||||
katiSuffix := "-" + config.TargetProduct() + config.CoverageSuffix()
|
katiSuffix := "-" + config.TargetProduct()
|
||||||
|
|
||||||
// Append kati arguments to the suffix.
|
// Append kati arguments to the suffix.
|
||||||
if args := config.KatiArgs(); len(args) > 0 {
|
if args := config.KatiArgs(); len(args) > 0 {
|
||||||
|
Reference in New Issue
Block a user