Remove --multitree-build

Multitree has been discontinued.

Test: m nothing --no-skip-soong-tests
Change-Id: Ie4d96a11279bf0f20a5e1a49837d9df4b24b1662
This commit is contained in:
Cole Faust 2024-02-28 15:35:49 -08:00
parent 4dc449593a
commit 331b27f511
5 changed files with 20 additions and 53 deletions

View file

@ -91,8 +91,6 @@ type CmdArgs struct {
ModuleActionsFile string
DocFile string
MultitreeBuild bool
BuildFromSourceStub bool
EnsureAllowlistIntegrity bool
@ -288,10 +286,6 @@ type config struct {
BuildMode SoongBuildMode
// If MultitreeBuild is true then this is one inner tree of a multitree
// build directed by the multitree orchestrator.
MultitreeBuild bool
// If testAllowNonExistentPaths is true then PathForSource and PathForModuleSrc won't error
// in tests when a path doesn't exist.
TestAllowNonExistentPaths bool
@ -541,8 +535,6 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error)
moduleListFile: cmdArgs.ModuleListFile,
fs: pathtools.NewOsFs(absSrcDir),
MultitreeBuild: cmdArgs.MultitreeBuild,
buildFromSourceStub: cmdArgs.BuildFromSourceStub,
}

View file

@ -76,7 +76,6 @@ func init() {
flag.StringVar(&cmdlineArgs.OutFile, "o", "build.ninja", "the Ninja file to output")
flag.StringVar(&cmdlineArgs.SoongVariables, "soong_variables", "soong.variables", "the file contains all build variables")
flag.BoolVar(&cmdlineArgs.EmptyNinjaFile, "empty-ninja-file", false, "write out a 0-byte ninja file")
flag.BoolVar(&cmdlineArgs.MultitreeBuild, "multitree-build", false, "this is a multitree build")
flag.BoolVar(&cmdlineArgs.BuildFromSourceStub, "build-from-source-stub", false, "build Java stubs from source files instead of API text files")
flag.BoolVar(&cmdlineArgs.EnsureAllowlistIntegrity, "ensure-allowlist-integrity", false, "verify that allowlisted modules are mixed-built")
flag.StringVar(&cmdlineArgs.ModuleDebugFile, "soong_module_debug", "", "soong module debug info file to write")

View file

@ -75,7 +75,6 @@ type configImpl struct {
queryview bool
reportMkMetrics bool // Collect and report mk2bp migration progress metrics.
soongDocs bool
multitreeBuild bool // This is a multitree build.
skipConfig bool
skipKati bool
skipKatiNinja bool
@ -424,10 +423,6 @@ func NewConfig(ctx Context, args ...string) Config {
// zip files produced by soong_zip. Disable zipbomb detection.
ret.environ.Set("UNZIP_DISABLE_ZIPBOMB_DETECTION", "TRUE")
if ret.MultitreeBuild() {
ret.environ.Set("MULTITREE_BUILD", "true")
}
outDir := ret.OutDir()
buildDateTimeFile := filepath.Join(outDir, "build_date.txt")
if buildDateTime, ok := ret.environ.Get("BUILD_DATETIME"); ok && buildDateTime != "" {
@ -789,8 +784,6 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
c.skipMetricsUpload = true
} else if arg == "--mk-metrics" {
c.reportMkMetrics = true
} else if arg == "--multitree-build" {
c.multitreeBuild = true
} else if arg == "--search-api-dir" {
c.searchApiDir = true
} else if strings.HasPrefix(arg, "--ninja_weight_source=") {
@ -1095,10 +1088,6 @@ func (c *configImpl) IsVerbose() bool {
return c.verbose
}
func (c *configImpl) MultitreeBuild() bool {
return c.multitreeBuild
}
func (c *configImpl) NinjaWeightListSource() NinjaWeightListSource {
return c.ninjaWeightListSource
}

View file

@ -860,23 +860,24 @@ func TestGetConfigArgsBuildModules(t *testing.T) {
}
func TestGetConfigArgsBuildModulesInDirectory(t *testing.T) {
tests := []buildActionTestCase{{
description: "normal execution in a directory",
dirsInTrees: []string{"0/1/2"},
buildFiles: []string{"0/1/2/Android.mk"},
args: []string{"fake-module"},
curDir: "0/1/2",
tidyOnly: "",
expectedArgs: []string{"fake-module", "MODULES-IN-0-1-2"},
}, {
description: "build file in parent directory",
dirsInTrees: []string{"0/1/2"},
buildFiles: []string{"0/1/Android.mk"},
args: []string{},
curDir: "0/1/2",
tidyOnly: "",
expectedArgs: []string{"MODULES-IN-0-1"},
},
tests := []buildActionTestCase{
{
description: "normal execution in a directory",
dirsInTrees: []string{"0/1/2"},
buildFiles: []string{"0/1/2/Android.mk"},
args: []string{"fake-module"},
curDir: "0/1/2",
tidyOnly: "",
expectedArgs: []string{"fake-module", "MODULES-IN-0-1-2"},
}, {
description: "build file in parent directory",
dirsInTrees: []string{"0/1/2"},
buildFiles: []string{"0/1/Android.mk"},
args: []string{},
curDir: "0/1/2",
tidyOnly: "",
expectedArgs: []string{"MODULES-IN-0-1"},
},
{
description: "build file in parent directory, multiple module names passed in",
dirsInTrees: []string{"0/1/2"},
@ -902,15 +903,6 @@ func TestGetConfigArgsBuildModulesInDirectory(t *testing.T) {
curDir: ".",
tidyOnly: "",
expectedArgs: []string{},
}, {
description: "multitree build action executed at root directory",
dirsInTrees: []string{},
buildFiles: []string{},
rootSymlink: false,
args: []string{"--multitree-build"},
curDir: ".",
tidyOnly: "",
expectedArgs: []string{"--multitree-build"},
}, {
description: "build action executed at root directory in symlink",
dirsInTrees: []string{},
@ -953,7 +945,8 @@ func TestGetConfigArgsBuildModulesInDirectory(t *testing.T) {
curDir: "",
tidyOnly: "",
expectedArgs: []string{"-j", "-k", "fake_module"},
}}
},
}
for _, tt := range tests {
t.Run("build action BUILD_MODULES_IN_DIR, "+tt.description, func(t *testing.T) {
testGetConfigArgs(t, tt, BUILD_MODULES_IN_A_DIRECTORY)

View file

@ -197,9 +197,6 @@ func (pb PrimaryBuilderFactory) primaryBuilderInvocation(config Config) bootstra
commonArgs = append(commonArgs, "-t")
}
if pb.config.multitreeBuild {
commonArgs = append(commonArgs, "--multitree-build")
}
if pb.config.buildFromSourceStub {
commonArgs = append(commonArgs, "--build-from-source-stub")
}
@ -305,9 +302,6 @@ func bootstrapBlueprint(ctx Context, config Config) {
if config.EmptyNinjaFile() {
mainSoongBuildExtraArgs = append(mainSoongBuildExtraArgs, "--empty-ninja-file")
}
if config.MultitreeBuild() {
mainSoongBuildExtraArgs = append(mainSoongBuildExtraArgs, "--multitree-build")
}
if config.buildFromSourceStub {
mainSoongBuildExtraArgs = append(mainSoongBuildExtraArgs, "--build-from-source-stub")
}