soong: Add product variable DevicePageSizeAgnostic
The product variable DevicePageSizeAgnostic will determine
whether AOSP is kernel page size agnostic or not.
Test: source build/envsetup.sh
lunch aosp_cf_arm64_phone_pgagnostic
m
cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO
Bug: 289419664
Change-Id: I33a1a4f1967d7e78432b7b8d90357d16b2002dcc
diff --git a/android/config.go b/android/config.go
index eb89493..efc977b 100644
--- a/android/config.go
+++ b/android/config.go
@@ -190,6 +190,12 @@
return String(c.config.productVariables.DeviceMaxPageSizeSupported)
}
+// PageSizeAgnostic returns true when AOSP is page size agnostic,
+// othersise it returns false.
+func (c Config) PageSizeAgnostic() bool {
+ return Bool(c.config.productVariables.DevicePageSizeAgnostic)
+}
+
// The release version passed to aconfig, derived from RELEASE_VERSION
func (c Config) ReleaseVersion() string {
return c.config.productVariables.ReleaseVersion
diff --git a/android/variable.go b/android/variable.go
index 03a80c1..d59e367 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -95,10 +95,6 @@
Cflags []string
}
- Device_page_size_agnostic struct {
- Cflags []string `android:"arch_variant"`
- } `android:"arch_variant"`
-
Override_rs_driver struct {
Cflags []string
}
@@ -232,6 +228,7 @@
DeviceCurrentApiLevelForVendorModules *string `json:",omitempty"`
DeviceSystemSdkVersions []string `json:",omitempty"`
DeviceMaxPageSizeSupported *string `json:",omitempty"`
+ DevicePageSizeAgnostic *bool `json:",omitempty"`
RecoverySnapshotVersion *string `json:",omitempty"`
@@ -287,7 +284,6 @@
Safestack *bool `json:",omitempty"`
HostStaticBinaries *bool `json:",omitempty"`
Binder32bit *bool `json:",omitempty"`
- Device_page_size_agnostic *bool `json:",omitempty"`
UseGoma *bool `json:",omitempty"`
UseRBE *bool `json:",omitempty"`
UseRBEJAVAC *bool `json:",omitempty"`
@@ -532,6 +528,7 @@
DeviceSecondaryCpuVariant: stringPtr("generic"),
DeviceSecondaryAbi: []string{"armeabi-v7a", "armeabi"},
DeviceMaxPageSizeSupported: stringPtr("4096"),
+ DevicePageSizeAgnostic: boolPtr(false),
AAPTConfig: []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
AAPTPreferredConfig: stringPtr("xhdpi"),
@@ -544,7 +541,6 @@
Safestack: boolPtr(false),
TrimmedApex: boolPtr(false),
Build_from_text_stub: boolPtr(false),
- Device_page_size_agnostic: boolPtr(false),
BootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},
ApexBootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},