Remove obsolete PDK build functionality

This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
This commit is contained in:
Dan Willemsen 2020-05-28 15:28:00 -07:00
parent a57e56a684
commit 9f43597ff7
14 changed files with 110 additions and 131 deletions

View File

@ -742,10 +742,6 @@ func (c *config) Fuchsia() bool {
return Bool(c.productVariables.Fuchsia) return Bool(c.productVariables.Fuchsia)
} }
func (c *config) IsPdkBuild() bool {
return Bool(c.productVariables.Pdk)
}
func (c *config) MinimizeJavaDebugInfo() bool { func (c *config) MinimizeJavaDebugInfo() bool {
return Bool(c.productVariables.MinimizeJavaDebugInfo) && !Bool(c.productVariables.Eng) return Bool(c.productVariables.MinimizeJavaDebugInfo) && !Bool(c.productVariables.Eng)
} }

View File

@ -233,7 +233,6 @@ type productVariables struct {
Eng *bool `json:",omitempty"` Eng *bool `json:",omitempty"`
Treble_linker_namespaces *bool `json:",omitempty"` Treble_linker_namespaces *bool `json:",omitempty"`
Enforce_vintf_manifest *bool `json:",omitempty"` Enforce_vintf_manifest *bool `json:",omitempty"`
Pdk *bool `json:",omitempty"`
Uml *bool `json:",omitempty"` Uml *bool `json:",omitempty"`
Use_lmkd_stats_log *bool `json:",omitempty"` Use_lmkd_stats_log *bool `json:",omitempty"`
Arc *bool `json:",omitempty"` Arc *bool `json:",omitempty"`

View File

@ -128,6 +128,10 @@ var fixSteps = []FixStep{
Name: "removeSoongConfigBoolVariable", Name: "removeSoongConfigBoolVariable",
Fix: removeSoongConfigBoolVariable, Fix: removeSoongConfigBoolVariable,
}, },
{
Name: "removePdkProperty",
Fix: runPatchListMod(removePdkProperty),
},
} }
func NewFixRequest() FixRequest { func NewFixRequest() FixRequest {
@ -993,6 +997,25 @@ func removeTags(mod *parser.Module, buf []byte, patchlist *parser.PatchList) err
return patchlist.Add(prop.Pos().Offset, prop.End().Offset+2, replaceStr) return patchlist.Add(prop.Pos().Offset, prop.End().Offset+2, replaceStr)
} }
func removePdkProperty(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
prop, ok := mod.GetProperty("product_variables")
if !ok {
return nil
}
propMap, ok := prop.Value.(*parser.Map)
if !ok {
return nil
}
pdkProp, ok := propMap.GetProperty("pdk")
if !ok {
return nil
}
if len(propMap.Properties) > 1 {
return patchlist.Add(pdkProp.Pos().Offset, pdkProp.End().Offset+2, "")
}
return patchlist.Add(prop.Pos().Offset, prop.End().Offset+2, "")
}
func mergeMatchingModuleProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error { func mergeMatchingModuleProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
return mergeMatchingProperties(&mod.Properties, buf, patchlist) return mergeMatchingProperties(&mod.Properties, buf, patchlist)
} }

View File

@ -998,3 +998,61 @@ func TestRemoveSoongConfigBoolVariable(t *testing.T) {
}) })
} }
} }
func TestRemovePdkProperty(t *testing.T) {
tests := []struct {
name string
in string
out string
}{
{
name: "remove property",
in: `
cc_library_shared {
name: "foo",
product_variables: {
other: {
bar: true,
},
pdk: {
enabled: false,
},
},
}
`,
out: `
cc_library_shared {
name: "foo",
product_variables: {
other: {
bar: true,
},
},
}
`,
},
{
name: "remove property and empty product_variables",
in: `
cc_library_shared {
name: "foo",
product_variables: {
pdk: {
enabled: false,
},
},
}
`,
out: `
cc_library_shared {
name: "foo",
}
`,
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
runPass(t, test.in, test.out, runPatchListMod(removePdkProperty))
})
}
}

View File

@ -26,7 +26,7 @@ import (
func init() { func init() {
pctx.VariableFunc("rsCmd", func(ctx android.PackageVarContext) string { pctx.VariableFunc("rsCmd", func(ctx android.PackageVarContext) string {
if ctx.Config().AlwaysUsePrebuiltSdks() { if ctx.Config().AlwaysUsePrebuiltSdks() {
// Use RenderScript prebuilts for unbundled builds but not PDK builds // Use RenderScript prebuilts for unbundled builds
return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin/llvm-rs-cc") return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin/llvm-rs-cc")
} else { } else {
return ctx.Config().HostToolPath(ctx, "llvm-rs-cc").String() return ctx.Config().HostToolPath(ctx, "llvm-rs-cc").String()

View File

@ -178,7 +178,7 @@ func init() {
func hostBinToolVariableWithSdkToolsPrebuilt(name, tool string) { func hostBinToolVariableWithSdkToolsPrebuilt(name, tool string) {
pctx.VariableFunc(name, func(ctx android.PackageVarContext) string { pctx.VariableFunc(name, func(ctx android.PackageVarContext) string {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin", tool) return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin", tool)
} else { } else {
return ctx.Config().HostToolPath(ctx, tool).String() return ctx.Config().HostToolPath(ctx, tool).String()
@ -188,7 +188,7 @@ func hostBinToolVariableWithSdkToolsPrebuilt(name, tool string) {
func hostJavaToolVariableWithSdkToolsPrebuilt(name, tool string) { func hostJavaToolVariableWithSdkToolsPrebuilt(name, tool string) {
pctx.VariableFunc(name, func(ctx android.PackageVarContext) string { pctx.VariableFunc(name, func(ctx android.PackageVarContext) string {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
return filepath.Join("prebuilts/sdk/tools/lib", tool+".jar") return filepath.Join("prebuilts/sdk/tools/lib", tool+".jar")
} else { } else {
return ctx.Config().HostJavaToolPath(ctx, tool+".jar").String() return ctx.Config().HostJavaToolPath(ctx, tool+".jar").String()
@ -198,7 +198,7 @@ func hostJavaToolVariableWithSdkToolsPrebuilt(name, tool string) {
func hostJNIToolVariableWithSdkToolsPrebuilt(name, tool string) { func hostJNIToolVariableWithSdkToolsPrebuilt(name, tool string) {
pctx.VariableFunc(name, func(ctx android.PackageVarContext) string { pctx.VariableFunc(name, func(ctx android.PackageVarContext) string {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
ext := ".so" ext := ".so"
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
ext = ".dylib" ext = ".dylib"
@ -212,7 +212,7 @@ func hostJNIToolVariableWithSdkToolsPrebuilt(name, tool string) {
func hostBinToolVariableWithBuildToolsPrebuilt(name, tool string) { func hostBinToolVariableWithBuildToolsPrebuilt(name, tool string) {
pctx.VariableFunc(name, func(ctx android.PackageVarContext) string { pctx.VariableFunc(name, func(ctx android.PackageVarContext) string {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
return filepath.Join("prebuilts/build-tools", ctx.Config().PrebuiltOS(), "bin", tool) return filepath.Join("prebuilts/build-tools", ctx.Config().PrebuiltOS(), "bin", tool)
} else { } else {
return ctx.Config().HostToolPath(ctx, tool).String() return ctx.Config().HostToolPath(ctx, tool).String()

View File

@ -505,7 +505,7 @@ func bootImageProfileRule(ctx android.SingletonContext, image *bootImageConfig,
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx) globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
global := dexpreopt.GetGlobalConfig(ctx) global := dexpreopt.GetGlobalConfig(ctx)
if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { if global.DisableGenerateProfile || ctx.Config().UnbundledBuild() {
return nil return nil
} }
profile := ctx.Config().Once(bootImageProfileRuleKey, func() interface{} { profile := ctx.Config().Once(bootImageProfileRuleKey, func() interface{} {
@ -560,7 +560,7 @@ func bootFrameworkProfileRule(ctx android.SingletonContext, image *bootImageConf
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx) globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
global := dexpreopt.GetGlobalConfig(ctx) global := dexpreopt.GetGlobalConfig(ctx)
if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { if global.DisableGenerateProfile || ctx.Config().UnbundledBuild() {
return nil return nil
} }
return ctx.Config().Once(bootFrameworkProfileRuleKey, func() interface{} { return ctx.Config().Once(bootFrameworkProfileRuleKey, func() interface{} {
@ -602,7 +602,7 @@ func bootFrameworkProfileRule(ctx android.SingletonContext, image *bootImageConf
var bootFrameworkProfileRuleKey = android.NewOnceKey("bootFrameworkProfileRule") var bootFrameworkProfileRuleKey = android.NewOnceKey("bootFrameworkProfileRule")
func updatableBcpPackagesRule(ctx android.SingletonContext, image *bootImageConfig, missingDeps []string) android.WritablePath { func updatableBcpPackagesRule(ctx android.SingletonContext, image *bootImageConfig, missingDeps []string) android.WritablePath {
if ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { if ctx.Config().UnbundledBuild() {
return nil return nil
} }

View File

@ -1081,9 +1081,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
rule.Build(pctx, ctx, "javadoc", desc) rule.Build(pctx, ctx, "javadoc", desc)
if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") && if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") {
!ctx.Config().IsPdkBuild() {
apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Api_file)) apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Api_file))
removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Removed_api_file)) removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Removed_api_file))
@ -1150,9 +1148,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
rule.Build(pctx, ctx, "doclavaCurrentApiUpdate", "update current API") rule.Build(pctx, ctx, "doclavaCurrentApiUpdate", "update current API")
} }
if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") && if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") {
!ctx.Config().IsPdkBuild() {
apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Api_file)) apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Api_file))
removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Removed_api_file)) removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Removed_api_file))
@ -1444,7 +1440,7 @@ func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *a
} }
func (d *Droidstubs) apiToXmlFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) { func (d *Droidstubs) apiToXmlFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() && d.apiFile != nil { if Bool(d.properties.Jdiff_enabled) && d.apiFile != nil {
if d.apiFile.String() == "" { if d.apiFile.String() == "" {
ctx.ModuleErrorf("API signature file has to be specified in Metalava when jdiff is enabled.") ctx.ModuleErrorf("API signature file has to be specified in Metalava when jdiff is enabled.")
} }
@ -1592,7 +1588,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Add API lint options. // Add API lint options.
if BoolDefault(d.properties.Check_api.Api_lint.Enabled, false) && !ctx.Config().IsPdkBuild() { if BoolDefault(d.properties.Check_api.Api_lint.Enabled, false) {
doApiLint = true doApiLint = true
newSince := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Api_lint.New_since) newSince := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Api_lint.New_since)
@ -1650,8 +1646,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Add "check released" options. (Detect incompatible API changes from the last public release) // Add "check released" options. (Detect incompatible API changes from the last public release)
if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") && if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") {
!ctx.Config().IsPdkBuild() {
doCheckReleased = true doCheckReleased = true
if len(d.Javadoc.properties.Out) > 0 { if len(d.Javadoc.properties.Out) > 0 {
@ -1728,8 +1723,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
rule.Build(pctx, ctx, "metalava", "metalava merged") rule.Build(pctx, ctx, "metalava", "metalava merged")
if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") && if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") {
!ctx.Config().IsPdkBuild() {
if len(d.Javadoc.properties.Out) > 0 { if len(d.Javadoc.properties.Out) > 0 {
ctx.PropertyErrorf("out", "out property may not be combined with check_api") ctx.PropertyErrorf("out", "out property may not be combined with check_api")
@ -1843,7 +1837,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
rule.Build(pctx, ctx, "nullabilityWarningsCheck", "nullability warnings check") rule.Build(pctx, ctx, "nullabilityWarningsCheck", "nullability warnings check")
} }
if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() { if Bool(d.properties.Jdiff_enabled) {
if len(d.Javadoc.properties.Out) > 0 { if len(d.Javadoc.properties.Out) > 0 {
ctx.PropertyErrorf("out", "out property may not be combined with jdiff") ctx.PropertyErrorf("out", "out property may not be combined with jdiff")
} }

View File

@ -191,23 +191,6 @@ func (s sdkSpec) prebuiltSdkAvailableForUnbundledBuild() bool {
return s.kind != sdkPrivate && s.kind != sdkNone && s.kind != sdkCorePlatform return s.kind != sdkPrivate && s.kind != sdkNone && s.kind != sdkCorePlatform
} }
// forPdkBuild converts this sdkSpec into another sdkSpec that is for the PDK builds.
func (s sdkSpec) forPdkBuild(ctx android.EarlyModuleContext) sdkSpec {
// For PDK builds, use the latest SDK version instead of "current" or ""
if s.kind == sdkPrivate || s.kind == sdkPublic {
kind := s.kind
if kind == sdkPrivate {
// We don't have prebuilt SDK for private APIs, so use the public SDK
// instead. This looks odd, but that's how it has been done.
// TODO(b/148271073): investigate the need for this.
kind = sdkPublic
}
version := sdkVersion(LatestSdkVersionInt(ctx))
return sdkSpec{kind, version, s.raw}
}
return s
}
// usePrebuilt determines whether prebuilt SDK should be used for this sdkSpec with the given context. // usePrebuilt determines whether prebuilt SDK should be used for this sdkSpec with the given context.
func (s sdkSpec) usePrebuilt(ctx android.EarlyModuleContext) bool { func (s sdkSpec) usePrebuilt(ctx android.EarlyModuleContext) bool {
if s.version.isCurrent() { if s.version.isCurrent() {
@ -233,9 +216,6 @@ func (s sdkSpec) effectiveVersion(ctx android.EarlyModuleContext) (sdkVersion, e
if !s.valid() { if !s.valid() {
return s.version, fmt.Errorf("invalid sdk version %q", s.raw) return s.version, fmt.Errorf("invalid sdk version %q", s.raw)
} }
if ctx.Config().IsPdkBuild() {
s = s.forPdkBuild(ctx)
}
if s.version.isNumbered() { if s.version.isNumbered() {
return s.version, nil return s.version, nil
} }
@ -350,9 +330,6 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
return sdkDep{} return sdkDep{}
} }
if ctx.Config().IsPdkBuild() {
sdkVersion = sdkVersion.forPdkBuild(ctx)
}
if !sdkVersion.validateSystemSdk(ctx) { if !sdkVersion.validateSystemSdk(ctx) {
return sdkDep{} return sdkDep{}
} }
@ -511,7 +488,7 @@ func sdkSingletonFactory() android.Singleton {
type sdkSingleton struct{} type sdkSingleton struct{}
func (sdkSingleton) GenerateBuildActions(ctx android.SingletonContext) { func (sdkSingleton) GenerateBuildActions(ctx android.SingletonContext) {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
return return
} }
@ -631,9 +608,6 @@ func createAPIFingerprint(ctx android.SingletonContext) {
if ctx.Config().PlatformSdkCodename() == "REL" { if ctx.Config().PlatformSdkCodename() == "REL" {
cmd.Text("echo REL >").Output(out) cmd.Text("echo REL >").Output(out)
} else if ctx.Config().IsPdkBuild() {
// TODO: get this from the PDK artifacts?
cmd.Text("echo PDK >").Output(out)
} else if !ctx.Config().AlwaysUsePrebuiltSdks() { } else if !ctx.Config().AlwaysUsePrebuiltSdks() {
in, err := ctx.GlobWithDeps("frameworks/base/api/*current.txt", nil) in, err := ctx.GlobWithDeps("frameworks/base/api/*current.txt", nil)
if err != nil { if err != nil {
@ -663,7 +637,7 @@ func ApiFingerprintPath(ctx android.PathContext) android.OutputPath {
} }
func sdkMakeVars(ctx android.MakeVarsContext) { func sdkMakeVars(ctx android.MakeVarsContext) {
if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() { if ctx.Config().AlwaysUsePrebuiltSdks() {
return return
} }

View File

@ -1124,22 +1124,17 @@ func (module *SdkLibrary) createImplLibrary(mctx android.DefaultableHookContext)
// Creates a static java library that has API stubs // Creates a static java library that has API stubs
func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext, apiScope *apiScope) { func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext, apiScope *apiScope) {
props := struct { props := struct {
Name *string Name *string
Visibility []string Visibility []string
Srcs []string Srcs []string
Installable *bool Installable *bool
Sdk_version *string Sdk_version *string
System_modules *string System_modules *string
Patch_module *string Patch_module *string
Libs []string Libs []string
Compile_dex *bool Compile_dex *bool
Java_version *string Java_version *string
Product_variables struct { Openjdk9 struct {
Pdk struct {
Enabled *bool
}
}
Openjdk9 struct {
Srcs []string Srcs []string
Javacflags []string Javacflags []string
} }
@ -1166,7 +1161,6 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext
props.Patch_module = module.properties.Patch_module props.Patch_module = module.properties.Patch_module
props.Installable = proptools.BoolPtr(false) props.Installable = proptools.BoolPtr(false)
props.Libs = module.sdkLibraryProperties.Stub_only_libs props.Libs = module.sdkLibraryProperties.Stub_only_libs
props.Product_variables.Pdk.Enabled = proptools.BoolPtr(false)
props.Openjdk9.Srcs = module.properties.Openjdk9.Srcs props.Openjdk9.Srcs = module.properties.Openjdk9.Srcs
props.Openjdk9.Javacflags = module.properties.Openjdk9.Javacflags props.Openjdk9.Javacflags = module.properties.Openjdk9.Javacflags
// We compile the stubs for 1.8 in line with the main android.jar stubs, and potential // We compile the stubs for 1.8 in line with the main android.jar stubs, and potential

View File

@ -30,7 +30,6 @@ func TestClasspath(t *testing.T) {
var classpathTestcases = []struct { var classpathTestcases = []struct {
name string name string
unbundled bool unbundled bool
pdk bool
moduleType string moduleType string
host android.OsClass host android.OsClass
properties string properties string
@ -216,35 +215,6 @@ func TestClasspath(t *testing.T) {
aidl: "-pprebuilts/sdk/current/public/framework.aidl", aidl: "-pprebuilts/sdk/current/public/framework.aidl",
}, },
{
name: "pdk default",
pdk: true,
bootclasspath: []string{`""`},
system: "sdk_public_30_system_modules",
java8classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
java9classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
aidl: "-pprebuilts/sdk/30/public/framework.aidl",
},
{
name: "pdk current",
pdk: true,
properties: `sdk_version: "current",`,
bootclasspath: []string{`""`},
system: "sdk_public_30_system_modules",
java8classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
java9classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
aidl: "-pprebuilts/sdk/30/public/framework.aidl",
},
{
name: "pdk 29",
pdk: true,
properties: `sdk_version: "29",`,
bootclasspath: []string{`""`},
system: "sdk_public_30_system_modules",
java8classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
java9classpath: []string{"prebuilts/sdk/30/public/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"},
aidl: "-pprebuilts/sdk/30/public/framework.aidl",
},
{ {
name: "module_current", name: "module_current",
properties: `sdk_version: "module_current",`, properties: `sdk_version: "module_current",`,
@ -386,9 +356,6 @@ func TestClasspath(t *testing.T) {
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true) config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
} }
if testcase.pdk {
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
}
ctx := testContext() ctx := testContext()
run(t, ctx, config) run(t, ctx, config)
@ -410,9 +377,6 @@ func TestClasspath(t *testing.T) {
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true) config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
} }
if testcase.pdk {
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
}
ctx := testContext() ctx := testContext()
run(t, ctx, config) run(t, ctx, config)
@ -437,9 +401,6 @@ func TestClasspath(t *testing.T) {
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true) config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
} }
if testcase.pdk {
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
}
ctx := testContext() ctx := testContext()
run(t, ctx, config) run(t, ctx, config)
@ -456,9 +417,6 @@ func TestClasspath(t *testing.T) {
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true) config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
} }
if testcase.pdk {
config.TestProductVariables.Pdk = proptools.BoolPtr(true)
}
ctx := testContext() ctx := testContext()
run(t, ctx, config) run(t, ctx, config)

View File

@ -53,8 +53,6 @@ type configImpl struct {
// Autodetected // Autodetected
totalRAM uint64 totalRAM uint64
pdkBuild bool
brokenDupRules bool brokenDupRules bool
brokenUsesNetwork bool brokenUsesNetwork bool
brokenNinjaEnvVars []string brokenNinjaEnvVars []string
@ -968,14 +966,6 @@ func (c *configImpl) TargetDeviceDir() string {
return c.targetDeviceDir return c.targetDeviceDir
} }
func (c *configImpl) SetPdkBuild(pdk bool) {
c.pdkBuild = pdk
}
func (c *configImpl) IsPdkBuild() bool {
return c.pdkBuild
}
func (c *configImpl) BuildDateTime() string { func (c *configImpl) BuildDateTime() string {
return c.buildDateTime return c.buildDateTime
} }

View File

@ -161,8 +161,6 @@ var BannerVars = []string{
"BUILD_ID", "BUILD_ID",
"OUT_DIR", "OUT_DIR",
"AUX_OS_VARIANT_LIST", "AUX_OS_VARIANT_LIST",
"TARGET_BUILD_PDK",
"PDK_FUSION_PLATFORM_ZIP",
"PRODUCT_SOONG_NAMESPACES", "PRODUCT_SOONG_NAMESPACES",
} }
@ -281,7 +279,6 @@ func runMakeProductConfig(ctx Context, config Config) {
config.SetTargetDevice(make_vars["TARGET_DEVICE"]) config.SetTargetDevice(make_vars["TARGET_DEVICE"])
config.SetTargetDeviceDir(make_vars["TARGET_DEVICE_DIR"]) config.SetTargetDeviceDir(make_vars["TARGET_DEVICE_DIR"])
config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true")
config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true") config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true")
config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true") config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true")
config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(make_vars["BUILD_BROKEN_NINJA_USES_ENV_VARS"])) config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(make_vars["BUILD_BROKEN_NINJA_USES_ENV_VARS"]))

View File

@ -134,14 +134,10 @@ func runKatiBuild(ctx Context, config Config) {
args := []string{ args := []string{
"--writable", config.OutDir() + "/", "--writable", config.OutDir() + "/",
"--werror_implicit_rules",
"-f", "build/make/core/main.mk", "-f", "build/make/core/main.mk",
} }
// PDK builds still uses a few implicit rules
if !config.IsPdkBuild() {
args = append(args, "--werror_implicit_rules")
}
if !config.BuildBrokenDupRules() { if !config.BuildBrokenDupRules() {
args = append(args, "--werror_overriding_commands") args = append(args, "--werror_overriding_commands")
} }