16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro
This is part of a larger change to update the flag PRODUCT_PAGE_SIZE_AGNOSTIC to PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO. This is to help clarify that this flag doesn't mean the device will actually work end-to-end with any page size. Bug: 312541564 Test: ``` source build/envsetup.sh lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug m cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO ``` Change-Id: I33033876d0d4a276d1bb962d40315b71a3968c66
This commit is contained in:
@@ -195,10 +195,12 @@ func (c Config) MaxPageSizeSupported() string {
|
|||||||
return String(c.config.productVariables.DeviceMaxPageSizeSupported)
|
return String(c.config.productVariables.DeviceMaxPageSizeSupported)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PageSizeAgnostic returns true when AOSP is page size agnostic,
|
// NoBionicPageSizeMacro returns true when AOSP is page size agnostic.
|
||||||
// othersise it returns false.
|
// This means that the bionic's macro PAGE_SIZE won't be defined.
|
||||||
func (c Config) PageSizeAgnostic() bool {
|
// Returns false when AOSP is NOT page size agnostic.
|
||||||
return Bool(c.config.productVariables.DevicePageSizeAgnostic)
|
// This means that bionic's macro PAGE_SIZE is defined.
|
||||||
|
func (c Config) NoBionicPageSizeMacro() bool {
|
||||||
|
return Bool(c.config.productVariables.DeviceNoBionicPageSizeMacro)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The release version passed to aconfig, derived from RELEASE_VERSION
|
// The release version passed to aconfig, derived from RELEASE_VERSION
|
||||||
|
@@ -224,7 +224,7 @@ type ProductVariables struct {
|
|||||||
DeviceCurrentApiLevelForVendorModules *string `json:",omitempty"`
|
DeviceCurrentApiLevelForVendorModules *string `json:",omitempty"`
|
||||||
DeviceSystemSdkVersions []string `json:",omitempty"`
|
DeviceSystemSdkVersions []string `json:",omitempty"`
|
||||||
DeviceMaxPageSizeSupported *string `json:",omitempty"`
|
DeviceMaxPageSizeSupported *string `json:",omitempty"`
|
||||||
DevicePageSizeAgnostic *bool `json:",omitempty"`
|
DeviceNoBionicPageSizeMacro *bool `json:",omitempty"`
|
||||||
|
|
||||||
VendorApiLevel *string `json:",omitempty"`
|
VendorApiLevel *string `json:",omitempty"`
|
||||||
|
|
||||||
@@ -582,20 +582,20 @@ func (v *ProductVariables) SetDefaultConfig() {
|
|||||||
Platform_version_all_preview_codenames: []string{"S"},
|
Platform_version_all_preview_codenames: []string{"S"},
|
||||||
Platform_vndk_version: stringPtr("S"),
|
Platform_vndk_version: stringPtr("S"),
|
||||||
|
|
||||||
HostArch: stringPtr("x86_64"),
|
HostArch: stringPtr("x86_64"),
|
||||||
HostSecondaryArch: stringPtr("x86"),
|
HostSecondaryArch: stringPtr("x86"),
|
||||||
DeviceName: stringPtr("generic_arm64"),
|
DeviceName: stringPtr("generic_arm64"),
|
||||||
DeviceProduct: stringPtr("aosp_arm-eng"),
|
DeviceProduct: stringPtr("aosp_arm-eng"),
|
||||||
DeviceArch: stringPtr("arm64"),
|
DeviceArch: stringPtr("arm64"),
|
||||||
DeviceArchVariant: stringPtr("armv8-a"),
|
DeviceArchVariant: stringPtr("armv8-a"),
|
||||||
DeviceCpuVariant: stringPtr("generic"),
|
DeviceCpuVariant: stringPtr("generic"),
|
||||||
DeviceAbi: []string{"arm64-v8a"},
|
DeviceAbi: []string{"arm64-v8a"},
|
||||||
DeviceSecondaryArch: stringPtr("arm"),
|
DeviceSecondaryArch: stringPtr("arm"),
|
||||||
DeviceSecondaryArchVariant: stringPtr("armv8-a"),
|
DeviceSecondaryArchVariant: stringPtr("armv8-a"),
|
||||||
DeviceSecondaryCpuVariant: stringPtr("generic"),
|
DeviceSecondaryCpuVariant: stringPtr("generic"),
|
||||||
DeviceSecondaryAbi: []string{"armeabi-v7a", "armeabi"},
|
DeviceSecondaryAbi: []string{"armeabi-v7a", "armeabi"},
|
||||||
DeviceMaxPageSizeSupported: stringPtr("4096"),
|
DeviceMaxPageSizeSupported: stringPtr("4096"),
|
||||||
DevicePageSizeAgnostic: boolPtr(false),
|
DeviceNoBionicPageSizeMacro: boolPtr(false),
|
||||||
|
|
||||||
AAPTConfig: []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
|
AAPTConfig: []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
|
||||||
AAPTPreferredConfig: stringPtr("xhdpi"),
|
AAPTPreferredConfig: stringPtr("xhdpi"),
|
||||||
|
@@ -320,7 +320,7 @@ func platformMappingSingleProduct(
|
|||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_abi=%s\n", strings.Join(productVariables.DeviceAbi, ",")))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_abi=%s\n", strings.Join(productVariables.DeviceAbi, ",")))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_max_page_size_supported=%s\n", proptools.String(productVariables.DeviceMaxPageSizeSupported)))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_max_page_size_supported=%s\n", proptools.String(productVariables.DeviceMaxPageSizeSupported)))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_name=%s\n", proptools.String(productVariables.DeviceName)))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_name=%s\n", proptools.String(productVariables.DeviceName)))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_page_size_agnostic=%t\n", proptools.Bool(productVariables.DevicePageSizeAgnostic)))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_no_bionic_page_size_macro=%t\n", proptools.Bool(productVariables.DeviceNoBionicPageSizeMacro)))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_product=%s\n", proptools.String(productVariables.DeviceProduct)))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_product=%s\n", proptools.String(productVariables.DeviceProduct)))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_platform=%s\n", label.String()))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:device_platform=%s\n", label.String()))
|
||||||
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:enable_cfi=%t\n", proptools.BoolDefault(productVariables.EnableCFI, true)))
|
result.WriteString(fmt.Sprintf(" --//build/bazel/product_config:enable_cfi=%t\n", proptools.BoolDefault(productVariables.EnableCFI, true)))
|
||||||
|
@@ -103,7 +103,7 @@ func init() {
|
|||||||
exportedVars.ExportStringList("Arm64Cflags", arm64Cflags)
|
exportedVars.ExportStringList("Arm64Cflags", arm64Cflags)
|
||||||
pctx.VariableFunc("Arm64Cflags", func(ctx android.PackageVarContext) string {
|
pctx.VariableFunc("Arm64Cflags", func(ctx android.PackageVarContext) string {
|
||||||
flags := arm64Cflags
|
flags := arm64Cflags
|
||||||
if ctx.Config().PageSizeAgnostic() {
|
if ctx.Config().NoBionicPageSizeMacro() {
|
||||||
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
|
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
|
||||||
}
|
}
|
||||||
return strings.Join(flags, " ")
|
return strings.Join(flags, " ")
|
||||||
|
@@ -107,7 +107,7 @@ func init() {
|
|||||||
exportedVars.ExportStringList("X86_64Cflags", x86_64Cflags)
|
exportedVars.ExportStringList("X86_64Cflags", x86_64Cflags)
|
||||||
pctx.VariableFunc("X86_64Cflags", func(ctx android.PackageVarContext) string {
|
pctx.VariableFunc("X86_64Cflags", func(ctx android.PackageVarContext) string {
|
||||||
flags := x86_64Cflags
|
flags := x86_64Cflags
|
||||||
if ctx.Config().PageSizeAgnostic() {
|
if ctx.Config().NoBionicPageSizeMacro() {
|
||||||
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
|
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
|
||||||
}
|
}
|
||||||
return strings.Join(flags, " ")
|
return strings.Join(flags, " ")
|
||||||
|
Reference in New Issue
Block a user