Revert "Add the implicit deps of javacRE"
This reverts commit eaa475107d
.
Reason for revert: This cl broke AOSP build, read more b/333846153
Change-Id: I5538a3c78617d7c2db98a11b60cb61269dcec8d3
This commit is contained in:
committed by
Gerrit Code Review
parent
eaa475107d
commit
d0476e4652
@@ -19,7 +19,6 @@ package java
|
|||||||
// functions.
|
// functions.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -69,8 +68,6 @@ var (
|
|||||||
}, map[string]*remoteexec.REParams{
|
}, map[string]*remoteexec.REParams{
|
||||||
"$javaTemplate": &remoteexec.REParams{
|
"$javaTemplate": &remoteexec.REParams{
|
||||||
Labels: map[string]string{"type": "compile", "lang": "java", "compiler": "javac"},
|
Labels: map[string]string{"type": "compile", "lang": "java", "compiler": "javac"},
|
||||||
Inputs: []string{"${config.JavacCmd}"},
|
|
||||||
RSPFiles: []string{"${out}.rsp", "${javacREClasspathDeps}"},
|
|
||||||
ExecStrategy: "${config.REJavacExecStrategy}",
|
ExecStrategy: "${config.REJavacExecStrategy}",
|
||||||
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
||||||
},
|
},
|
||||||
@@ -89,7 +86,7 @@ var (
|
|||||||
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
Platform: map[string]string{remoteexec.PoolKey: "${config.REJavaPool}"},
|
||||||
},
|
},
|
||||||
}, []string{"javacFlags", "bootClasspath", "classpath", "processorpath", "processor", "srcJars", "srcJarDir",
|
}, []string{"javacFlags", "bootClasspath", "classpath", "processorpath", "processor", "srcJars", "srcJarDir",
|
||||||
"outDir", "annoDir", "annoSrcJar", "javaVersion"}, []string{"javacREClasspathDeps"})
|
"outDir", "annoDir", "annoSrcJar", "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() })
|
||||||
@@ -604,7 +601,17 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
|
|||||||
annoDir = filepath.Join(shardDir, annoDir)
|
annoDir = filepath.Join(shardDir, annoDir)
|
||||||
}
|
}
|
||||||
rule := javac
|
rule := javac
|
||||||
args := map[string]string{
|
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_JAVAC") {
|
||||||
|
rule = javacRE
|
||||||
|
}
|
||||||
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
Rule: rule,
|
||||||
|
Description: desc,
|
||||||
|
Output: outputFile,
|
||||||
|
ImplicitOutput: annoSrcJar,
|
||||||
|
Inputs: srcFiles,
|
||||||
|
Implicits: deps,
|
||||||
|
Args: map[string]string{
|
||||||
"javacFlags": flags.javacFlags,
|
"javacFlags": flags.javacFlags,
|
||||||
"bootClasspath": bootClasspath,
|
"bootClasspath": bootClasspath,
|
||||||
"classpath": classpathArg,
|
"classpath": classpathArg,
|
||||||
@@ -616,32 +623,7 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
|
|||||||
"annoDir": android.PathForModuleOut(ctx, intermediatesDir, annoDir).String(),
|
"annoDir": android.PathForModuleOut(ctx, intermediatesDir, annoDir).String(),
|
||||||
"annoSrcJar": annoSrcJar.String(),
|
"annoSrcJar": annoSrcJar.String(),
|
||||||
"javaVersion": flags.javaVersion.String(),
|
"javaVersion": flags.javaVersion.String(),
|
||||||
}
|
},
|
||||||
|
|
||||||
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_JAVAC") {
|
|
||||||
rule = javacRE
|
|
||||||
|
|
||||||
// Write the classpath deps to a file that can be passed as an input to javacRE.
|
|
||||||
// Skip the shardIdx if the java library is unsharded
|
|
||||||
shardIdxSuffix := strconv.Itoa(shardIdx)
|
|
||||||
if shardIdx == -1 {
|
|
||||||
shardIdxSuffix = ""
|
|
||||||
}
|
|
||||||
javacREClasspathDepsFile := outputFile.ReplaceExtension(ctx, fmt.Sprintf("javacre.classpathdeps%v", shardIdxSuffix))
|
|
||||||
android.WriteFileRule(ctx, javacREClasspathDepsFile, strings.Join(javacClasspath.Strings(), ",")) // The classpath jars are an implicit dep of javacRE
|
|
||||||
args["javacREClasspathDeps"] = javacREClasspathDepsFile.String()
|
|
||||||
|
|
||||||
// Add the deps file to the implicit inputs
|
|
||||||
deps = append(deps, javacREClasspathDepsFile)
|
|
||||||
}
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
|
||||||
Rule: rule,
|
|
||||||
Description: desc,
|
|
||||||
Output: outputFile,
|
|
||||||
ImplicitOutput: annoSrcJar,
|
|
||||||
Inputs: srcFiles,
|
|
||||||
Implicits: deps,
|
|
||||||
Args: args,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user