Loading android/config.go +6 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,12 @@ func (c Config) MaxPageSizeSupported() string { 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 Loading android/variable.go +2 −6 Original line number Diff line number Diff line Loading @@ -95,10 +95,6 @@ type variableProperties struct { Cflags []string } Device_page_size_agnostic struct { Cflags []string `android:"arch_variant"` } `android:"arch_variant"` Override_rs_driver struct { Cflags []string } Loading Loading @@ -227,6 +223,7 @@ type ProductVariables struct { DeviceCurrentApiLevelForVendorModules *string `json:",omitempty"` DeviceSystemSdkVersions []string `json:",omitempty"` DeviceMaxPageSizeSupported *string `json:",omitempty"` DevicePageSizeAgnostic *bool `json:",omitempty"` RecoverySnapshotVersion *string `json:",omitempty"` Loading Loading @@ -282,7 +279,6 @@ type ProductVariables struct { 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"` Loading Loading @@ -527,6 +523,7 @@ func (v *ProductVariables) SetDefaultConfig() { 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"), Loading @@ -539,7 +536,6 @@ func (v *ProductVariables) SetDefaultConfig() { 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{}}, Loading bp2build/bp2build_product_config.go +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,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_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_page_size_agnostic=%t\n", proptools.Bool(productVariables.Device_page_size_agnostic))) 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_product=%s\n", proptools.String(productVariables.DeviceProduct))) 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:enforce_vintf_manifest=%t\n", proptools.Bool(productVariables.Enforce_vintf_manifest))) Loading cc/config/arm64_device.go +9 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,15 @@ func init() { return strings.Join(flags, " ") }) exportedVars.ExportStringListStaticVariable("Arm64Cflags", arm64Cflags) exportedVars.ExportStringList("Arm64Cflags", arm64Cflags) pctx.VariableFunc("Arm64Cflags", func(ctx android.PackageVarContext) string { flags := arm64Cflags if ctx.Config().PageSizeAgnostic() { flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO") } return strings.Join(flags, " ") }) exportedVars.ExportStringListStaticVariable("Arm64Cppflags", arm64Cppflags) exportedVars.ExportVariableReferenceDict("Arm64ArchVariantCflags", arm64ArchVariantCflagsVar) Loading Loading
android/config.go +6 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,12 @@ func (c Config) MaxPageSizeSupported() string { 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 Loading
android/variable.go +2 −6 Original line number Diff line number Diff line Loading @@ -95,10 +95,6 @@ type variableProperties struct { Cflags []string } Device_page_size_agnostic struct { Cflags []string `android:"arch_variant"` } `android:"arch_variant"` Override_rs_driver struct { Cflags []string } Loading Loading @@ -227,6 +223,7 @@ type ProductVariables struct { DeviceCurrentApiLevelForVendorModules *string `json:",omitempty"` DeviceSystemSdkVersions []string `json:",omitempty"` DeviceMaxPageSizeSupported *string `json:",omitempty"` DevicePageSizeAgnostic *bool `json:",omitempty"` RecoverySnapshotVersion *string `json:",omitempty"` Loading Loading @@ -282,7 +279,6 @@ type ProductVariables struct { 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"` Loading Loading @@ -527,6 +523,7 @@ func (v *ProductVariables) SetDefaultConfig() { 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"), Loading @@ -539,7 +536,6 @@ func (v *ProductVariables) SetDefaultConfig() { 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{}}, Loading
bp2build/bp2build_product_config.go +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,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_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_page_size_agnostic=%t\n", proptools.Bool(productVariables.Device_page_size_agnostic))) 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_product=%s\n", proptools.String(productVariables.DeviceProduct))) 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:enforce_vintf_manifest=%t\n", proptools.Bool(productVariables.Enforce_vintf_manifest))) Loading
cc/config/arm64_device.go +9 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,15 @@ func init() { return strings.Join(flags, " ") }) exportedVars.ExportStringListStaticVariable("Arm64Cflags", arm64Cflags) exportedVars.ExportStringList("Arm64Cflags", arm64Cflags) pctx.VariableFunc("Arm64Cflags", func(ctx android.PackageVarContext) string { flags := arm64Cflags if ctx.Config().PageSizeAgnostic() { flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO") } return strings.Join(flags, " ") }) exportedVars.ExportStringListStaticVariable("Arm64Cppflags", arm64Cppflags) exportedVars.ExportVariableReferenceDict("Arm64ArchVariantCflags", arm64ArchVariantCflagsVar) Loading