Loading android/bazel_handler.go +3 −8 Original line number Diff line number Diff line Loading @@ -229,8 +229,6 @@ type mixedBuildBazelContext struct { bazelEnabledModules map[string]bool // DCLA modules are enabled when used in apex. bazelDclaEnabledModules map[string]bool // If true, modules are bazel-enabled by default, unless present in bazelDisabledModules. modulesDefaultToBazel bool targetProduct string targetBuildVariant string Loading Loading @@ -497,10 +495,8 @@ func GetBazelEnabledAndDisabledModules(buildMode SoongBuildMode, forceEnabled ma for enabledAdHocModule := range forceEnabled { enabledModules[enabledAdHocModule] = true } case BazelDevMode: AddToStringSet(disabledModules, allowlists.MixedBuildsDisabledList) default: panic("Expected BazelProdMode, BazelStagingMode, or BazelDevMode") panic("Expected BazelProdMode or BazelStagingMode") } return enabledModules, disabledModules } Loading @@ -518,7 +514,7 @@ func GetBazelEnabledModules(buildMode SoongBuildMode) []string { } func NewBazelContext(c *config) (BazelContext, error) { if c.BuildMode != BazelProdMode && c.BuildMode != BazelStagingMode && c.BuildMode != BazelDevMode { if c.BuildMode != BazelProdMode && c.BuildMode != BazelStagingMode { return noopBazelContext{}, nil } Loading Loading @@ -582,7 +578,6 @@ func NewBazelContext(c *config) (BazelContext, error) { return &mixedBuildBazelContext{ bazelRunner: &builtinBazelRunner{c.UseBazelProxy, absolutePath(c.outDir)}, paths: &paths, modulesDefaultToBazel: c.BuildMode == BazelDevMode, bazelEnabledModules: enabledModules, bazelDisabledModules: disabledModules, bazelDclaEnabledModules: dclaEnabledModules, Loading @@ -606,7 +601,7 @@ func (context *mixedBuildBazelContext) IsModuleNameAllowed(moduleName string, wi return true } return context.modulesDefaultToBazel return false } func (context *mixedBuildBazelContext) IsModuleDclaAllowed(moduleName string) bool { Loading android/bazel_handler_test.go +0 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,6 @@ func TestIsModuleNameAllowed(t *testing.T) { } bazelContext := &mixedBuildBazelContext{ modulesDefaultToBazel: false, bazelEnabledModules: enabledModules, bazelDisabledModules: disabledModules, bazelDclaEnabledModules: dclaEnabledModules, Loading android/config.go +1 −8 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ type CmdArgs struct { MultitreeBuild bool BazelMode bool BazelModeDev bool BazelModeStaging bool BazelForceEnabledModules string Loading Loading @@ -132,11 +131,6 @@ const ( // Generate a documentation file for module type definitions and exit. GenerateDocFile // Use bazel during analysis of many allowlisted build modules. The allowlist // is considered a "developer mode" allowlist, as some modules may be // allowlisted on an experimental basis. BazelDevMode // Use bazel during analysis of a few allowlisted build modules. The allowlist // is considered "staging, as these are modules being prepared to be released // into prod mode shortly after. Loading Loading @@ -622,7 +616,6 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error) setBuildMode(cmdArgs.BazelApiBp2buildDir, ApiBp2build) setBuildMode(cmdArgs.ModuleGraphFile, GenerateModuleGraph) setBuildMode(cmdArgs.DocFile, GenerateDocFile) setBazelMode(cmdArgs.BazelModeDev, "--bazel-mode-dev", BazelDevMode) setBazelMode(cmdArgs.BazelMode, "--bazel-mode", BazelProdMode) setBazelMode(cmdArgs.BazelModeStaging, "--bazel-mode-staging", BazelStagingMode) Loading Loading @@ -726,7 +719,7 @@ func (c *config) IsMixedBuildsEnabled() bool { return true }).(bool) bazelModeEnabled := c.BuildMode == BazelProdMode || c.BuildMode == BazelDevMode || c.BuildMode == BazelStagingMode bazelModeEnabled := c.BuildMode == BazelProdMode || c.BuildMode == BazelStagingMode return globalMixedBuildsSupport && bazelModeEnabled } Loading cmd/multiproduct_kati/main.go +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ var alternateResultDir = flag.Bool("dist", false, "write select results to $DIST var bazelMode = flag.Bool("bazel-mode", false, "use bazel for analysis of certain modules") var bazelModeStaging = flag.Bool("bazel-mode-staging", false, "use bazel for analysis of certain near-ready modules") var bazelModeDev = flag.Bool("bazel-mode-dev", false, "use bazel for analysis of a large number of modules (less stable)") var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)") var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)") Loading Loading @@ -229,10 +228,6 @@ func getBazelArg() string { count++ str = "--bazel-mode-staging" } if *bazelModeDev { count++ str = "--bazel-mode-dev" } if count > 1 { // Can't set more than one Loading cmd/soong_build/main.go +0 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,6 @@ func init() { flag.BoolVar(&cmdlineArgs.MultitreeBuild, "multitree-build", false, "this is a multitree build") flag.BoolVar(&cmdlineArgs.BazelMode, "bazel-mode", false, "use bazel for analysis of certain modules") flag.BoolVar(&cmdlineArgs.BazelModeStaging, "bazel-mode-staging", false, "use bazel for analysis of certain near-ready modules") flag.BoolVar(&cmdlineArgs.BazelModeDev, "bazel-mode-dev", false, "use bazel for analysis of a large number of modules (less stable)") flag.BoolVar(&cmdlineArgs.UseBazelProxy, "use-bazel-proxy", false, "communicate with bazel using unix socket proxy instead of spawning subprocesses") flag.BoolVar(&cmdlineArgs.BuildFromTextStub, "build-from-text-stub", false, "build Java stubs from API text files instead of source files") flag.BoolVar(&cmdlineArgs.EnsureAllowlistIntegrity, "ensure-allowlist-integrity", false, "verify that allowlisted modules are mixed-built") Loading Loading
android/bazel_handler.go +3 −8 Original line number Diff line number Diff line Loading @@ -229,8 +229,6 @@ type mixedBuildBazelContext struct { bazelEnabledModules map[string]bool // DCLA modules are enabled when used in apex. bazelDclaEnabledModules map[string]bool // If true, modules are bazel-enabled by default, unless present in bazelDisabledModules. modulesDefaultToBazel bool targetProduct string targetBuildVariant string Loading Loading @@ -497,10 +495,8 @@ func GetBazelEnabledAndDisabledModules(buildMode SoongBuildMode, forceEnabled ma for enabledAdHocModule := range forceEnabled { enabledModules[enabledAdHocModule] = true } case BazelDevMode: AddToStringSet(disabledModules, allowlists.MixedBuildsDisabledList) default: panic("Expected BazelProdMode, BazelStagingMode, or BazelDevMode") panic("Expected BazelProdMode or BazelStagingMode") } return enabledModules, disabledModules } Loading @@ -518,7 +514,7 @@ func GetBazelEnabledModules(buildMode SoongBuildMode) []string { } func NewBazelContext(c *config) (BazelContext, error) { if c.BuildMode != BazelProdMode && c.BuildMode != BazelStagingMode && c.BuildMode != BazelDevMode { if c.BuildMode != BazelProdMode && c.BuildMode != BazelStagingMode { return noopBazelContext{}, nil } Loading Loading @@ -582,7 +578,6 @@ func NewBazelContext(c *config) (BazelContext, error) { return &mixedBuildBazelContext{ bazelRunner: &builtinBazelRunner{c.UseBazelProxy, absolutePath(c.outDir)}, paths: &paths, modulesDefaultToBazel: c.BuildMode == BazelDevMode, bazelEnabledModules: enabledModules, bazelDisabledModules: disabledModules, bazelDclaEnabledModules: dclaEnabledModules, Loading @@ -606,7 +601,7 @@ func (context *mixedBuildBazelContext) IsModuleNameAllowed(moduleName string, wi return true } return context.modulesDefaultToBazel return false } func (context *mixedBuildBazelContext) IsModuleDclaAllowed(moduleName string) bool { Loading
android/bazel_handler_test.go +0 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,6 @@ func TestIsModuleNameAllowed(t *testing.T) { } bazelContext := &mixedBuildBazelContext{ modulesDefaultToBazel: false, bazelEnabledModules: enabledModules, bazelDisabledModules: disabledModules, bazelDclaEnabledModules: dclaEnabledModules, Loading
android/config.go +1 −8 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ type CmdArgs struct { MultitreeBuild bool BazelMode bool BazelModeDev bool BazelModeStaging bool BazelForceEnabledModules string Loading Loading @@ -132,11 +131,6 @@ const ( // Generate a documentation file for module type definitions and exit. GenerateDocFile // Use bazel during analysis of many allowlisted build modules. The allowlist // is considered a "developer mode" allowlist, as some modules may be // allowlisted on an experimental basis. BazelDevMode // Use bazel during analysis of a few allowlisted build modules. The allowlist // is considered "staging, as these are modules being prepared to be released // into prod mode shortly after. Loading Loading @@ -622,7 +616,6 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error) setBuildMode(cmdArgs.BazelApiBp2buildDir, ApiBp2build) setBuildMode(cmdArgs.ModuleGraphFile, GenerateModuleGraph) setBuildMode(cmdArgs.DocFile, GenerateDocFile) setBazelMode(cmdArgs.BazelModeDev, "--bazel-mode-dev", BazelDevMode) setBazelMode(cmdArgs.BazelMode, "--bazel-mode", BazelProdMode) setBazelMode(cmdArgs.BazelModeStaging, "--bazel-mode-staging", BazelStagingMode) Loading Loading @@ -726,7 +719,7 @@ func (c *config) IsMixedBuildsEnabled() bool { return true }).(bool) bazelModeEnabled := c.BuildMode == BazelProdMode || c.BuildMode == BazelDevMode || c.BuildMode == BazelStagingMode bazelModeEnabled := c.BuildMode == BazelProdMode || c.BuildMode == BazelStagingMode return globalMixedBuildsSupport && bazelModeEnabled } Loading
cmd/multiproduct_kati/main.go +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ var alternateResultDir = flag.Bool("dist", false, "write select results to $DIST var bazelMode = flag.Bool("bazel-mode", false, "use bazel for analysis of certain modules") var bazelModeStaging = flag.Bool("bazel-mode-staging", false, "use bazel for analysis of certain near-ready modules") var bazelModeDev = flag.Bool("bazel-mode-dev", false, "use bazel for analysis of a large number of modules (less stable)") var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)") var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)") Loading Loading @@ -229,10 +228,6 @@ func getBazelArg() string { count++ str = "--bazel-mode-staging" } if *bazelModeDev { count++ str = "--bazel-mode-dev" } if count > 1 { // Can't set more than one Loading
cmd/soong_build/main.go +0 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,6 @@ func init() { flag.BoolVar(&cmdlineArgs.MultitreeBuild, "multitree-build", false, "this is a multitree build") flag.BoolVar(&cmdlineArgs.BazelMode, "bazel-mode", false, "use bazel for analysis of certain modules") flag.BoolVar(&cmdlineArgs.BazelModeStaging, "bazel-mode-staging", false, "use bazel for analysis of certain near-ready modules") flag.BoolVar(&cmdlineArgs.BazelModeDev, "bazel-mode-dev", false, "use bazel for analysis of a large number of modules (less stable)") flag.BoolVar(&cmdlineArgs.UseBazelProxy, "use-bazel-proxy", false, "communicate with bazel using unix socket proxy instead of spawning subprocesses") flag.BoolVar(&cmdlineArgs.BuildFromTextStub, "build-from-text-stub", false, "build Java stubs from API text files instead of source files") flag.BoolVar(&cmdlineArgs.EnsureAllowlistIntegrity, "ensure-allowlist-integrity", false, "verify that allowlisted modules are mixed-built") Loading