From d9efcabf74bbd935c85394860711f6076cd560ae Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 13 Jun 2023 14:16:54 +0900 Subject: [PATCH] Remove symlink to the build.ninja From the previous change, build.ninja is generated as a symlink of build..ninja for any missing use case of build.ninja. As this was a temporary solution while introducing new changes, removing this feature and move all build.ninja usage into build..ninja. Bug: 277029044 Test: aosp_cf build succeeded Change-Id: I6e8d2840491654fa4253b1febfaecf0ee9455a2d --- cmd/soong_build/main.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go index e903c0a94..1135570cb 100644 --- a/cmd/soong_build/main.go +++ b/cmd/soong_build/main.go @@ -532,8 +532,6 @@ func main() { var finalOutputFile string - writeSymlink := false - // Run Soong for a specific activity, like bp2build, queryview // or the actual Soong build for the build.ninja file. switch configuration.BuildMode { @@ -556,13 +554,8 @@ func main() { maybeQuit(err, "") } } - writeSymlink = true } else { finalOutputFile = runSoongOnlyBuild(ctx, extraNinjaDeps) - - if configuration.BuildMode == android.AnalysisNoBazel { - writeSymlink = true - } } writeMetrics(configuration, ctx.EventHandler, metricsDir) } @@ -579,24 +572,6 @@ func main() { // are ninja inputs to the main output file, then ninja would superfluously // rebuild this output file on the next build invocation. touch(shared.JoinPath(topDir, finalOutputFile)) - - // TODO(b/277029044): Remove this function once build..ninja lands - if writeSymlink { - writeBuildNinjaSymlink(configuration, finalOutputFile) - } -} - -// TODO(b/277029044): Remove this function once build..ninja lands -func writeBuildNinjaSymlink(config android.Config, source string) { - targetPath := shared.JoinPath(topDir, config.SoongOutDir(), "build.ninja") - sourcePath := shared.JoinPath(topDir, source) - - if targetPath == sourcePath { - return - } - - os.Remove(targetPath) - os.Symlink(sourcePath, targetPath) } func writeUsedEnvironmentFile(configuration android.Config) {