Cleanup more bazel code
Bug: 315353489 Test: m nothing --no-skip-soong-tests Change-Id: I6c6b4fcd559f4a45b1a96c70cbb5d6d1a615ccff
This commit is contained in:
@@ -27,7 +27,6 @@ import (
|
||||
|
||||
"android/soong/ui/tracer"
|
||||
|
||||
"android/soong/bazel"
|
||||
"android/soong/ui/metrics"
|
||||
"android/soong/ui/metrics/metrics_proto"
|
||||
"android/soong/ui/status"
|
||||
@@ -603,10 +602,6 @@ func runSoong(ctx Context, config Config) {
|
||||
|
||||
checkEnvironmentFile(ctx, soongBuildEnv, config.UsedEnvFile(soongBuildTag))
|
||||
|
||||
// Remove bazel files in the event that bazel is disabled for the build.
|
||||
// These files may have been left over from a previous bazel-enabled build.
|
||||
cleanBazelFiles(config)
|
||||
|
||||
if config.JsonModuleGraph() {
|
||||
checkEnvironmentFile(ctx, soongBuildEnv, config.UsedEnvFile(jsonModuleGraphTag))
|
||||
}
|
||||
@@ -758,18 +753,6 @@ func loadSoongBuildMetrics(ctx Context, config Config, oldTimestamp time.Time) {
|
||||
}
|
||||
}
|
||||
|
||||
func cleanBazelFiles(config Config) {
|
||||
files := []string{
|
||||
shared.JoinPath(config.SoongOutDir(), "bp2build"),
|
||||
shared.JoinPath(config.SoongOutDir(), "workspace"),
|
||||
shared.JoinPath(config.SoongOutDir(), bazel.SoongInjectionDirName),
|
||||
shared.JoinPath(config.OutDir(), "bazel")}
|
||||
|
||||
for _, f := range files {
|
||||
os.RemoveAll(f)
|
||||
}
|
||||
}
|
||||
|
||||
func runMicrofactory(ctx Context, config Config, name string, pkg string, mapping map[string]string) {
|
||||
ctx.BeginTrace(metrics.RunSoong, name)
|
||||
defer ctx.EndTrace()
|
||||
|
Reference in New Issue
Block a user