Merge "Check UseRBE is set before replacing any template with the RE version." am: 3e0b9c031c am: 4e2977ee81

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15747538

Change-Id: Ifa33cdad01dac8e81724d97f6373b745ff775ca9
This commit is contained in:
Kousik Kumar 2021-09-07 14:32:59 +00:00 committed by Automerger Merge Worker
commit e78212a55c
3 changed files with 6 additions and 6 deletions

View File

@ -517,7 +517,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
sAbiDumpFiles = append(sAbiDumpFiles, sAbiDumpFile)
dumpRule := sAbiDump
if ctx.Config().IsEnvTrue("RBE_ABI_DUMPER") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_ABI_DUMPER") {
dumpRule = sAbiDumpRE
}
ctx.Build(pctx, android.BuildParams{
@ -702,7 +702,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
}
rule := ld
if ctx.Config().IsEnvTrue("RBE_CXX_LINKS") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_CXX_LINKS") {
rule = ldRE
}
@ -848,7 +848,7 @@ func TransformObjsToObj(ctx android.ModuleContext, objFiles android.Paths,
"ldCmd": ldCmd,
"ldFlags": flags.ldFlags,
}
if ctx.Config().IsEnvTrue("RBE_CXX_LINKS") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_CXX_LINKS") {
rule = partialLdRE
args["inCommaList"] = strings.Join(objFiles.Strings(), ",")
}

View File

@ -297,7 +297,7 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
annoDir = filepath.Join(shardDir, annoDir)
}
rule := javac
if ctx.Config().IsEnvTrue("RBE_JAVAC") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_JAVAC") {
rule = javacRE
}
ctx.Build(pctx, android.BuildParams{

View File

@ -204,7 +204,7 @@ func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
"outDict": j.proguardDictionary.String(),
"outDir": outDir.String(),
}
if ctx.Config().IsEnvTrue("RBE_R8") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_R8") {
rule = r8RE
args["implicits"] = strings.Join(r8Deps.Strings(), ",")
}
@ -220,7 +220,7 @@ func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
} else {
d8Flags, d8Deps := j.d8Flags(ctx, flags)
rule := d8
if ctx.Config().IsEnvTrue("RBE_D8") {
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_D8") {
rule = d8RE
}
ctx.Build(pctx, android.BuildParams{