Merge "Refactor RBE support for Javac/R8/D8 to use the remoteexec package."
This commit is contained in:
commit
0b3b3db525
|
@ -349,6 +349,7 @@ bootstrap_go_package {
|
||||||
deps: [
|
deps: [
|
||||||
"blueprint-proptools",
|
"blueprint-proptools",
|
||||||
"soong-android",
|
"soong-android",
|
||||||
|
"soong-remoteexec",
|
||||||
],
|
],
|
||||||
srcs: [
|
srcs: [
|
||||||
"java/config/config.go",
|
"java/config/config.go",
|
||||||
|
|
|
@ -232,30 +232,10 @@ func (p PackageContext) StaticRule(name string, params blueprint.RuleParams,
|
||||||
}, argNames...)
|
}, argNames...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RBEExperimentalFlag indicates which flag should be set for the AndroidRemoteStaticRule
|
|
||||||
// to use RBE.
|
|
||||||
type RBEExperimentalFlag int
|
|
||||||
|
|
||||||
const (
|
|
||||||
// RBE_NOT_EXPERIMENTAL indicates the rule should use RBE in every build that has
|
|
||||||
// UseRBE set.
|
|
||||||
RBE_NOT_EXPERIMENTAL RBEExperimentalFlag = iota
|
|
||||||
// RBE_JAVAC indicates the rule should use RBE only if the RBE_JAVAC variable is
|
|
||||||
// set in an RBE enabled build.
|
|
||||||
RBE_JAVAC
|
|
||||||
// RBE_R8 indicates the rule should use RBE only if the RBE_R8 variable is set in
|
|
||||||
// an RBE enabled build.
|
|
||||||
RBE_R8
|
|
||||||
// RBE_D8 indicates the rule should use RBE only if the RBE_D8 variable is set in
|
|
||||||
// an RBE enabled build.
|
|
||||||
RBE_D8
|
|
||||||
)
|
|
||||||
|
|
||||||
// RemoteRuleSupports configures rules with whether they have Goma and/or RBE support.
|
// RemoteRuleSupports configures rules with whether they have Goma and/or RBE support.
|
||||||
type RemoteRuleSupports struct {
|
type RemoteRuleSupports struct {
|
||||||
Goma bool
|
Goma bool
|
||||||
RBE bool
|
RBE bool
|
||||||
RBEFlag RBEExperimentalFlag
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AndroidRemoteStaticRule wraps blueprint.StaticRule but uses goma or RBE's parallelism if goma or RBE are enabled
|
// AndroidRemoteStaticRule wraps blueprint.StaticRule but uses goma or RBE's parallelism if goma or RBE are enabled
|
||||||
|
@ -277,18 +257,6 @@ func (p PackageContext) AndroidRemoteStaticRule(name string, supports RemoteRule
|
||||||
params.Pool = localPool
|
params.Pool = localPool
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Config().UseRBE() && supports.RBE {
|
|
||||||
if supports.RBEFlag == RBE_JAVAC && !ctx.Config().UseRBEJAVAC() {
|
|
||||||
params.Pool = localPool
|
|
||||||
}
|
|
||||||
if supports.RBEFlag == RBE_R8 && !ctx.Config().UseRBER8() {
|
|
||||||
params.Pool = localPool
|
|
||||||
}
|
|
||||||
if supports.RBEFlag == RBE_D8 && !ctx.Config().UseRBED8() {
|
|
||||||
params.Pool = localPool
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return params, nil
|
return params, nil
|
||||||
}, argNames...)
|
}, argNames...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,10 +257,10 @@ func init() {
|
||||||
return ""
|
return ""
|
||||||
})
|
})
|
||||||
|
|
||||||
pctx.VariableFunc("RECXXPool", envOverrideFunc("RBE_CXX_POOL", remoteexec.DefaultPool))
|
pctx.VariableFunc("RECXXPool", remoteexec.EnvOverrideFunc("RBE_CXX_POOL", remoteexec.DefaultPool))
|
||||||
pctx.VariableFunc("RECXXLinksPool", envOverrideFunc("RBE_CXX_LINKS_POOL", remoteexec.DefaultPool))
|
pctx.VariableFunc("RECXXLinksPool", remoteexec.EnvOverrideFunc("RBE_CXX_LINKS_POOL", remoteexec.DefaultPool))
|
||||||
pctx.VariableFunc("RECXXLinksExecStrategy", envOverrideFunc("RBE_CXX_LINKS_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
pctx.VariableFunc("RECXXLinksExecStrategy", remoteexec.EnvOverrideFunc("RBE_CXX_LINKS_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||||
pctx.VariableFunc("REAbiDumperExecStrategy", envOverrideFunc("RBE_ABI_DUMPER_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
pctx.VariableFunc("REAbiDumperExecStrategy", remoteexec.EnvOverrideFunc("RBE_ABI_DUMPER_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||||
}
|
}
|
||||||
|
|
||||||
var HostPrebuiltTag = pctx.VariableConfigMethod("HostPrebuiltTag", android.Config.PrebuiltOS)
|
var HostPrebuiltTag = pctx.VariableConfigMethod("HostPrebuiltTag", android.Config.PrebuiltOS)
|
||||||
|
|
|
@ -27,6 +27,7 @@ import (
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
"android/soong/remoteexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -39,12 +40,12 @@ var (
|
||||||
// (if the rule produces .class files) or a .srcjar file (if the rule produces .java files).
|
// (if the rule produces .class files) or a .srcjar file (if the rule produces .java files).
|
||||||
// .srcjar files are unzipped into a temporary directory when compiled with javac.
|
// .srcjar files are unzipped into a temporary directory when compiled with javac.
|
||||||
// TODO(b/143658984): goma can't handle the --system argument to javac.
|
// TODO(b/143658984): goma can't handle the --system argument to javac.
|
||||||
javac = pctx.AndroidRemoteStaticRule("javac", android.RemoteRuleSupports{Goma: false, RBE: true, RBEFlag: android.RBE_JAVAC},
|
javac, javacRE = remoteexec.StaticRules(pctx, "javac",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf "$outDir" "$annoDir" "$srcJarDir" && mkdir -p "$outDir" "$annoDir" "$srcJarDir" && ` +
|
Command: `rm -rf "$outDir" "$annoDir" "$srcJarDir" && mkdir -p "$outDir" "$annoDir" "$srcJarDir" && ` +
|
||||||
`${config.ZipSyncCmd} -d $srcJarDir -l $srcJarDir/list -f "*.java" $srcJars && ` +
|
`${config.ZipSyncCmd} -d $srcJarDir -l $srcJarDir/list -f "*.java" $srcJars && ` +
|
||||||
`(if [ -s $srcJarDir/list ] || [ -s $out.rsp ] ; then ` +
|
`(if [ -s $srcJarDir/list ] || [ -s $out.rsp ] ; then ` +
|
||||||
`${config.SoongJavacWrapper} ${config.JavacWrapper}${config.JavacCmd} ` +
|
`${config.SoongJavacWrapper} $reTemplate${config.JavacCmd} ` +
|
||||||
`${config.JavacHeapFlags} ${config.JavacVmFlags} ${config.CommonJdkFlags} ` +
|
`${config.JavacHeapFlags} ${config.JavacVmFlags} ${config.CommonJdkFlags} ` +
|
||||||
`$processorpath $processor $javacFlags $bootClasspath $classpath ` +
|
`$processorpath $processor $javacFlags $bootClasspath $classpath ` +
|
||||||
`-source $javaVersion -target $javaVersion ` +
|
`-source $javaVersion -target $javaVersion ` +
|
||||||
|
@ -59,9 +60,12 @@ var (
|
||||||
CommandOrderOnly: []string{"${config.SoongJavacWrapper}"},
|
CommandOrderOnly: []string{"${config.SoongJavacWrapper}"},
|
||||||
Rspfile: "$out.rsp",
|
Rspfile: "$out.rsp",
|
||||||
RspfileContent: "$in",
|
RspfileContent: "$in",
|
||||||
},
|
}, &remoteexec.REParams{
|
||||||
"javacFlags", "bootClasspath", "classpath", "processorpath", "processor", "srcJars", "srcJarDir",
|
Labels: map[string]string{"type": "compile", "lang": "java", "compiler": "javac"},
|
||||||
"outDir", "annoDir", "javaVersion")
|
ExecStrategy: "${config.REJavacExecStrategy}",
|
||||||
|
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
||||||
|
}, []string{"javacFlags", "bootClasspath", "classpath", "processorpath", "processor", "srcJars", "srcJarDir",
|
||||||
|
"outDir", "annoDir", "javaVersion"}, nil)
|
||||||
|
|
||||||
_ = pctx.VariableFunc("kytheCorpus",
|
_ = pctx.VariableFunc("kytheCorpus",
|
||||||
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCorpusName() })
|
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCorpusName() })
|
||||||
|
@ -188,6 +192,7 @@ var (
|
||||||
func init() {
|
func init() {
|
||||||
pctx.Import("android/soong/android")
|
pctx.Import("android/soong/android")
|
||||||
pctx.Import("android/soong/java/config")
|
pctx.Import("android/soong/java/config")
|
||||||
|
pctx.Import("android/soong/remoteexec")
|
||||||
}
|
}
|
||||||
|
|
||||||
type javaBuilderFlags struct {
|
type javaBuilderFlags struct {
|
||||||
|
@ -398,8 +403,12 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
|
||||||
outDir = filepath.Join(shardDir, outDir)
|
outDir = filepath.Join(shardDir, outDir)
|
||||||
annoDir = filepath.Join(shardDir, annoDir)
|
annoDir = filepath.Join(shardDir, annoDir)
|
||||||
}
|
}
|
||||||
|
rule := javac
|
||||||
|
if ctx.Config().IsEnvTrue("RBE_JAVAC") {
|
||||||
|
rule = javacRE
|
||||||
|
}
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: javac,
|
Rule: rule,
|
||||||
Description: desc,
|
Description: desc,
|
||||||
Output: outputFile,
|
Output: outputFile,
|
||||||
Inputs: srcFiles,
|
Inputs: srcFiles,
|
||||||
|
|
|
@ -22,6 +22,7 @@ import (
|
||||||
_ "github.com/google/blueprint/bootstrap"
|
_ "github.com/google/blueprint/bootstrap"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
"android/soong/remoteexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -137,30 +138,16 @@ func init() {
|
||||||
pctx.HostJavaToolVariable("MetalavaJar", "metalava.jar")
|
pctx.HostJavaToolVariable("MetalavaJar", "metalava.jar")
|
||||||
pctx.HostJavaToolVariable("DokkaJar", "dokka.jar")
|
pctx.HostJavaToolVariable("DokkaJar", "dokka.jar")
|
||||||
pctx.HostJavaToolVariable("JetifierJar", "jetifier.jar")
|
pctx.HostJavaToolVariable("JetifierJar", "jetifier.jar")
|
||||||
|
pctx.HostJavaToolVariable("R8Jar", "r8-compat-proguard.jar")
|
||||||
|
pctx.HostJavaToolVariable("D8Jar", "d8.jar")
|
||||||
|
|
||||||
pctx.HostBinToolVariable("SoongJavacWrapper", "soong_javac_wrapper")
|
pctx.HostBinToolVariable("SoongJavacWrapper", "soong_javac_wrapper")
|
||||||
pctx.HostBinToolVariable("DexpreoptGen", "dexpreopt_gen")
|
pctx.HostBinToolVariable("DexpreoptGen", "dexpreopt_gen")
|
||||||
|
|
||||||
pctx.VariableFunc("JavacWrapper", func(ctx android.PackageVarContext) string {
|
pctx.VariableFunc("REJavaPool", remoteexec.EnvOverrideFunc("RBE_JAVA_POOL", "java16"))
|
||||||
if override := ctx.Config().Getenv("JAVAC_WRAPPER"); override != "" {
|
pctx.VariableFunc("REJavacExecStrategy", remoteexec.EnvOverrideFunc("RBE_JAVAC_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||||
return override + " "
|
pctx.VariableFunc("RED8ExecStrategy", remoteexec.EnvOverrideFunc("RBE_D8_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||||
}
|
pctx.VariableFunc("RER8ExecStrategy", remoteexec.EnvOverrideFunc("RBE_R8_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||||
return ""
|
|
||||||
})
|
|
||||||
|
|
||||||
pctx.VariableFunc("R8Wrapper", func(ctx android.PackageVarContext) string {
|
|
||||||
if override := ctx.Config().Getenv("R8_WRAPPER"); override != "" {
|
|
||||||
return override + " "
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
})
|
|
||||||
|
|
||||||
pctx.VariableFunc("D8Wrapper", func(ctx android.PackageVarContext) string {
|
|
||||||
if override := ctx.Config().Getenv("D8_WRAPPER"); override != "" {
|
|
||||||
return override + " "
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
})
|
|
||||||
|
|
||||||
pctx.HostJavaToolVariable("JacocoCLIJar", "jacoco-cli.jar")
|
pctx.HostJavaToolVariable("JacocoCLIJar", "jacoco-cli.jar")
|
||||||
|
|
||||||
|
|
53
java/dex.go
53
java/dex.go
|
@ -20,12 +20,13 @@ import (
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
"android/soong/remoteexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var d8 = pctx.AndroidRemoteStaticRule("d8", android.RemoteRuleSupports{RBE: true, RBEFlag: android.RBE_D8},
|
var d8, d8RE = remoteexec.StaticRules(pctx, "d8",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
||||||
`${config.D8Wrapper}${config.D8Cmd} ${config.DexFlags} --output $outDir $d8Flags $in && ` +
|
`$reTemplate${config.D8Cmd} ${config.DexFlags} --output $outDir $d8Flags $in && ` +
|
||||||
`${config.SoongZipCmd} $zipFlags -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` +
|
`${config.SoongZipCmd} $zipFlags -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` +
|
||||||
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
|
@ -33,14 +34,19 @@ var d8 = pctx.AndroidRemoteStaticRule("d8", android.RemoteRuleSupports{RBE: true
|
||||||
"${config.SoongZipCmd}",
|
"${config.SoongZipCmd}",
|
||||||
"${config.MergeZipsCmd}",
|
"${config.MergeZipsCmd}",
|
||||||
},
|
},
|
||||||
},
|
}, &remoteexec.REParams{
|
||||||
"outDir", "d8Flags", "zipFlags")
|
Labels: map[string]string{"type": "compile", "compiler": "d8"},
|
||||||
|
Inputs: []string{"${config.D8Jar}"},
|
||||||
|
ExecStrategy: "${config.RED8ExecStrategy}",
|
||||||
|
ToolchainInputs: []string{"${config.JavaCmd}"},
|
||||||
|
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
||||||
|
}, []string{"outDir", "d8Flags", "zipFlags"}, nil)
|
||||||
|
|
||||||
var r8 = pctx.AndroidRemoteStaticRule("r8", android.RemoteRuleSupports{RBE: true, RBEFlag: android.RBE_R8},
|
var r8, r8RE = remoteexec.StaticRules(pctx, "r8",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
||||||
`rm -f "$outDict" && ` +
|
`rm -f "$outDict" && ` +
|
||||||
`${config.R8Wrapper}${config.R8Cmd} ${config.DexFlags} -injars $in --output $outDir ` +
|
`$reTemplate${config.R8Cmd} ${config.DexFlags} -injars $in --output $outDir ` +
|
||||||
`--force-proguard-compatibility ` +
|
`--force-proguard-compatibility ` +
|
||||||
`--no-data-resources ` +
|
`--no-data-resources ` +
|
||||||
`-printmapping $outDict ` +
|
`-printmapping $outDict ` +
|
||||||
|
@ -53,8 +59,13 @@ var r8 = pctx.AndroidRemoteStaticRule("r8", android.RemoteRuleSupports{RBE: true
|
||||||
"${config.SoongZipCmd}",
|
"${config.SoongZipCmd}",
|
||||||
"${config.MergeZipsCmd}",
|
"${config.MergeZipsCmd}",
|
||||||
},
|
},
|
||||||
},
|
}, &remoteexec.REParams{
|
||||||
"outDir", "outDict", "r8Flags", "zipFlags")
|
Labels: map[string]string{"type": "compile", "compiler": "r8"},
|
||||||
|
Inputs: []string{"$implicits", "${config.R8Jar}"},
|
||||||
|
ExecStrategy: "${config.RER8ExecStrategy}",
|
||||||
|
ToolchainInputs: []string{"${config.JavaCmd}"},
|
||||||
|
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
||||||
|
}, []string{"outDir", "outDict", "r8Flags", "zipFlags"}, []string{"implicits"})
|
||||||
|
|
||||||
func (j *Module) dexCommonFlags(ctx android.ModuleContext) []string {
|
func (j *Module) dexCommonFlags(ctx android.ModuleContext) []string {
|
||||||
flags := j.deviceProperties.Dxflags
|
flags := j.deviceProperties.Dxflags
|
||||||
|
@ -185,24 +196,34 @@ func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
|
||||||
proguardDictionary := android.PathForModuleOut(ctx, "proguard_dictionary")
|
proguardDictionary := android.PathForModuleOut(ctx, "proguard_dictionary")
|
||||||
j.proguardDictionary = proguardDictionary
|
j.proguardDictionary = proguardDictionary
|
||||||
r8Flags, r8Deps := j.r8Flags(ctx, flags)
|
r8Flags, r8Deps := j.r8Flags(ctx, flags)
|
||||||
|
rule := r8
|
||||||
|
args := map[string]string{
|
||||||
|
"r8Flags": strings.Join(r8Flags, " "),
|
||||||
|
"zipFlags": zipFlags,
|
||||||
|
"outDict": j.proguardDictionary.String(),
|
||||||
|
"outDir": outDir.String(),
|
||||||
|
}
|
||||||
|
if ctx.Config().IsEnvTrue("RBE_R8") {
|
||||||
|
rule = r8RE
|
||||||
|
args["implicits"] = strings.Join(r8Deps.Strings(), ",")
|
||||||
|
}
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: r8,
|
Rule: rule,
|
||||||
Description: "r8",
|
Description: "r8",
|
||||||
Output: javalibJar,
|
Output: javalibJar,
|
||||||
ImplicitOutput: proguardDictionary,
|
ImplicitOutput: proguardDictionary,
|
||||||
Input: classesJar,
|
Input: classesJar,
|
||||||
Implicits: r8Deps,
|
Implicits: r8Deps,
|
||||||
Args: map[string]string{
|
Args: args,
|
||||||
"r8Flags": strings.Join(r8Flags, " "),
|
|
||||||
"zipFlags": zipFlags,
|
|
||||||
"outDict": j.proguardDictionary.String(),
|
|
||||||
"outDir": outDir.String(),
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
d8Flags, d8Deps := j.d8Flags(ctx, flags)
|
d8Flags, d8Deps := j.d8Flags(ctx, flags)
|
||||||
|
rule := d8
|
||||||
|
if ctx.Config().IsEnvTrue("RBE_D8") {
|
||||||
|
rule = d8RE
|
||||||
|
}
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: d8,
|
Rule: rule,
|
||||||
Description: "d8",
|
Description: "d8",
|
||||||
Output: javalibJar,
|
Output: javalibJar,
|
||||||
Input: classesJar,
|
Input: classesJar,
|
||||||
|
|
|
@ -154,3 +154,14 @@ func StaticRules(ctx android.PackageContext, name string, ruleParams blueprint.R
|
||||||
return ctx.AndroidStaticRule(name, ruleParams, commonArgs...),
|
return ctx.AndroidStaticRule(name, ruleParams, commonArgs...),
|
||||||
ctx.AndroidRemoteStaticRule(name+"RE", android.RemoteRuleSupports{RBE: true}, ruleParamsRE, append(commonArgs, reArgs...)...)
|
ctx.AndroidRemoteStaticRule(name+"RE", android.RemoteRuleSupports{RBE: true}, ruleParamsRE, append(commonArgs, reArgs...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EnvOverrideFunc retrieves a variable func that evaluates to the value of the given environment
|
||||||
|
// variable if set, otherwise the given default.
|
||||||
|
func EnvOverrideFunc(envVar, defaultVal string) func(ctx android.PackageVarContext) string {
|
||||||
|
return func(ctx android.PackageVarContext) string {
|
||||||
|
if override := ctx.Config().Getenv(envVar); override != "" {
|
||||||
|
return override
|
||||||
|
}
|
||||||
|
return defaultVal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -783,48 +783,6 @@ func (c *configImpl) UseRBE() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) UseRBEJAVAC() bool {
|
|
||||||
if !c.UseRBE() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if v, ok := c.environ.Get("RBE_JAVAC"); ok {
|
|
||||||
v = strings.TrimSpace(v)
|
|
||||||
if v != "" && v != "false" {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) UseRBER8() bool {
|
|
||||||
if !c.UseRBE() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if v, ok := c.environ.Get("RBE_R8"); ok {
|
|
||||||
v = strings.TrimSpace(v)
|
|
||||||
if v != "" && v != "false" {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) UseRBED8() bool {
|
|
||||||
if !c.UseRBE() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if v, ok := c.environ.Get("RBE_D8"); ok {
|
|
||||||
v = strings.TrimSpace(v)
|
|
||||||
if v != "" && v != "false" {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configImpl) StartRBE() bool {
|
func (c *configImpl) StartRBE() bool {
|
||||||
if !c.UseRBE() {
|
if !c.UseRBE() {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue