summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2023-10-16 13:30:51 -0700
committer Cole Faust <colefaust@google.com> 2023-10-16 14:20:00 -0700
commit3b703f3c022725438da5fbf478833db971cd992a (patch)
treeb185280780c498735588d4169c914aabdc55f4c7
parent7b4de4b859fbf56c75732d92b5e516ff387826be (diff)
Remove baseModuleContext.debug
It was never set to true. Test: Presubmits Change-Id: I9944d90b7e75beb4a7fe259c72bc7a82e42f593d
-rw-r--r--android/config.go8
-rw-r--r--android/module.go6
-rw-r--r--android/paths.go13
-rw-r--r--android/rule_builder.go2
-rw-r--r--android/test_suites.go4
5 files changed, 12 insertions, 21 deletions
diff --git a/android/config.go b/android/config.go
index 8f72239b9..66c0e6de3 100644
--- a/android/config.go
+++ b/android/config.go
@@ -789,7 +789,7 @@ func (c *config) HostToolDir() string {
}
func (c *config) HostToolPath(ctx PathContext, tool string) Path {
- path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool)
+ path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", tool)
return path
}
@@ -798,12 +798,12 @@ func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path {
if runtime.GOOS == "darwin" {
ext = ".dylib"
}
- path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", false, lib+ext)
+ path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", lib+ext)
return path
}
func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path {
- path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool)
+ path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", tool)
return path
}
@@ -812,7 +812,7 @@ func (c *config) HostCcSharedLibPath(ctx PathContext, lib string) Path {
if ctx.Config().BuildArch.Multilib == "lib64" {
libDir = "lib64"
}
- return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, false, lib+".so")
+ return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, lib+".so")
}
// PrebuiltOS returns the name of the host OS used in prebuilts directories.
diff --git a/android/module.go b/android/module.go
index ce6c78d35..b73f449fc 100644
--- a/android/module.go
+++ b/android/module.go
@@ -380,7 +380,6 @@ type BaseModuleContext interface {
Device() bool
Darwin() bool
Windows() bool
- Debug() bool
PrimaryArch() bool
}
@@ -2675,7 +2674,6 @@ type baseModuleContext struct {
target Target
multiTargets []Target
targetPrimary bool
- debug bool
walkPath []Module
tagPath []blueprint.DependencyTag
@@ -3306,10 +3304,6 @@ func (b *baseModuleContext) Windows() bool {
return b.os == Windows
}
-func (b *baseModuleContext) Debug() bool {
- return b.debug
-}
-
func (b *baseModuleContext) PrimaryArch() bool {
if len(b.config.Targets[b.target.Os]) <= 1 {
return true
diff --git a/android/paths.go b/android/paths.go
index 8c0c6c404..7658299b4 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -480,7 +480,7 @@ func (p OutputPaths) Strings() []string {
// PathForGoBinary returns the path to the installed location of a bootstrap_go_binary module.
func PathForGoBinary(ctx PathContext, goBinary bootstrap.GoBinaryTool) Path {
- goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false)
+ goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin")
rel := Rel(ctx, goBinaryInstallDir.String(), goBinary.InstallPath())
return goBinaryInstallDir.Join(ctx, rel)
}
@@ -1684,19 +1684,19 @@ func (p InstallPath) ToMakePath() InstallPath {
func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath {
os, arch := osAndArch(ctx)
partition := modulePartition(ctx, os)
- return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...)
+ return pathForInstall(ctx, os, arch, partition, pathComponents...)
}
// PathForHostDexInstall returns an InstallPath representing the install path for the
// module appended with paths...
func PathForHostDexInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath {
- return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", ctx.Debug(), pathComponents...)
+ return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", pathComponents...)
}
// PathForModuleInPartitionInstall is similar to PathForModuleInstall but partition is provided by the caller
func PathForModuleInPartitionInstall(ctx ModuleInstallPathContext, partition string, pathComponents ...string) InstallPath {
os, arch := osAndArch(ctx)
- return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...)
+ return pathForInstall(ctx, os, arch, partition, pathComponents...)
}
func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) {
@@ -1712,7 +1712,7 @@ func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) {
return os, arch
}
-func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, debug bool,
+func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string,
pathComponents ...string) InstallPath {
var partitionPaths []string
@@ -1742,9 +1742,6 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string,
}
partitionPaths = []string{"host", osName + "-" + archName, partition}
}
- if debug {
- partitionPaths = append([]string{"debug"}, partitionPaths...)
- }
partitionPath, err := validatePath(partitionPaths...)
if err != nil {
diff --git a/android/rule_builder.go b/android/rule_builder.go
index 245b759ca..5c6dffec1 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -871,7 +871,7 @@ func (c *RuleBuilderCommand) PathForOutput(path WritablePath) string {
func sboxPathForToolRel(ctx BuilderContext, path Path) string {
// Errors will be handled in RuleBuilder.Build where we have a context to report them
- toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", false)
+ toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "")
relOutSoong, isRelOutSoong, _ := maybeRelErr(toolDir.String(), path.String())
if isRelOutSoong {
// The tool is in the Soong output directory, it will be copied to __SBOX_OUT_DIR__/tools/out
diff --git a/android/test_suites.go b/android/test_suites.go
index 63a709fb7..9ded99832 100644
--- a/android/test_suites.go
+++ b/android/test_suites.go
@@ -60,7 +60,7 @@ func robolectricTestSuite(ctx SingletonContext, files map[string]InstallPaths) W
for _, module := range SortedKeys(files) {
installedPaths = append(installedPaths, files[module]...)
}
- testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases", false)
+ testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases")
outputFile := PathForOutput(ctx, "packaging", "robolectric-tests.zip")
rule := NewRuleBuilder(pctx, ctx)
@@ -69,7 +69,7 @@ func robolectricTestSuite(ctx SingletonContext, files map[string]InstallPaths) W
FlagWithArg("-P ", "host/testcases").
FlagWithArg("-C ", testCasesDir.String()).
FlagWithRspFileInputList("-r ", outputFile.ReplaceExtension(ctx, "rsp"), installedPaths.Paths()).
- Flag("-sha256")
+ Flag("-sha256")
rule.Build("robolectric_tests_zip", "robolectric-tests.zip")
return outputFile