From 769a8eee3caf79cbf2d9850c12daf23bccb1b68e Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 31 Jul 2024 02:01:03 +0000 Subject: [PATCH] Revert^2 "Conditionally pass kernel version to build.prop" This reverts commit 29fed1efe85cc07bb4311513e4acc1da73dfb298. Reason for revert: Fixed breakage with aosp/3200730, verified with ABTD Change-Id: I207abd188636673250eb9a070be95db0b82f39e7 --- android/build_prop.go | 7 ++++++- android/config.go | 4 ++++ android/variable.go | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/android/build_prop.go b/android/build_prop.go index d3ccecb66..c5cf38ad0 100644 --- a/android/build_prop.go +++ b/android/build_prop.go @@ -106,7 +106,12 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { postProcessCmd.Flag("--allow-dup") } postProcessCmd.FlagWithArg("--sdk-version ", config.PlatformSdkVersion().String()) - postProcessCmd.FlagWithInput("--kernel-version-file-for-uffd-gc ", PathForOutput(ctx, "dexpreopt/kernel_version_for_uffd_gc.txt")) + if ctx.Config().EnableUffdGc() == "default" { + postProcessCmd.FlagWithInput("--kernel-version-file-for-uffd-gc ", PathForOutput(ctx, "dexpreopt/kernel_version_for_uffd_gc.txt")) + } else { + // still need to pass an empty string to kernel-version-file-for-uffd-gc + postProcessCmd.FlagWithArg("--kernel-version-file-for-uffd-gc ", `""`) + } postProcessCmd.Text(p.outputFilePath.String()) postProcessCmd.Flags(p.properties.Block_list) diff --git a/android/config.go b/android/config.go index 4ecff08d7..c21fa8110 100644 --- a/android/config.go +++ b/android/config.go @@ -2109,3 +2109,7 @@ func (c *config) UseDebugArt() bool { func (c *config) SystemPropFiles(ctx PathContext) Paths { return PathsForSource(ctx, c.productVariables.SystemPropFiles) } + +func (c *config) EnableUffdGc() string { + return String(c.productVariables.EnableUffdGc) +} diff --git a/android/variable.go b/android/variable.go index a5bbd8026..95f9c56af 100644 --- a/android/variable.go +++ b/android/variable.go @@ -534,6 +534,8 @@ type ProductVariables struct { ArtTargetIncludeDebugBuild *bool `json:",omitempty"` SystemPropFiles []string `json:",omitempty"` + + EnableUffdGc *string `json:",omitempty"` } type PartitionQualifiedVariablesType struct {