Loading android/arch.go +10 −2 Original line number Diff line number Diff line Loading @@ -655,7 +655,8 @@ func archMutator(bpctx blueprint.BottomUpMutatorContext) { prefer32 := os == Windows // Determine the multilib selection for this module. multilib, extraMultilib := decodeMultilib(base, os) force_first_on_device := mctx.Config().ForceMultilibFirstOnDevice() multilib, extraMultilib := decodeMultilib(base, os, force_first_on_device) // Convert the multilib selection into a list of Targets. targets, err := decodeMultilibTargets(multilib, osTargets, prefer32) Loading Loading @@ -730,7 +731,7 @@ func addTargetProperties(m Module, target Target, multiTargets []Target, primary // multilib from the factory's call to InitAndroidArchModule if none was set. For modules that // called InitAndroidMultiTargetsArchModule it always returns "common" for multilib, and returns // the actual multilib in extraMultilib. func decodeMultilib(base *ModuleBase, os OsType) (multilib, extraMultilib string) { func decodeMultilib(base *ModuleBase, os OsType, force_first_on_device bool) (multilib, extraMultilib string) { // First check the "android.compile_multilib" or "host.compile_multilib" properties. switch os.Class { case Device: Loading @@ -749,6 +750,13 @@ func decodeMultilib(base *ModuleBase, os OsType) (multilib, extraMultilib string multilib = base.commonProperties.Default_multilib } // If a device is configured with multiple targets, this option // force all device targets that prefer32 to be compiled only as // the first target. if force_first_on_device && os.Class == Device && (multilib == "prefer32" || multilib == "first_prefer32") { multilib = "first" } if base.commonProperties.UseTargetVariants { // Darwin has the concept of "universal binaries" which is implemented in Soong by // building both x86_64 and arm64 variants, and having select module types know how to Loading android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1701,6 +1701,10 @@ func (c *deviceConfig) GenerateAidlNdkPlatformBackend() bool { return c.config.productVariables.GenerateAidlNdkPlatformBackend } func (c *config) ForceMultilibFirstOnDevice() bool { return c.productVariables.ForceMultilibFirstOnDevice } // The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs. // Such lists are used in the build system for things like bootclasspath jars or system server jars. // The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a Loading android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,8 @@ type productVariables struct { SepolicyFreezeTestExtraPrebuiltDirs []string `json:",omitempty"` GenerateAidlNdkPlatformBackend bool `json:",omitempty"` ForceMultilibFirstOnDevice bool `json:",omitempty"` } func boolPtr(v bool) *bool { Loading Loading
android/arch.go +10 −2 Original line number Diff line number Diff line Loading @@ -655,7 +655,8 @@ func archMutator(bpctx blueprint.BottomUpMutatorContext) { prefer32 := os == Windows // Determine the multilib selection for this module. multilib, extraMultilib := decodeMultilib(base, os) force_first_on_device := mctx.Config().ForceMultilibFirstOnDevice() multilib, extraMultilib := decodeMultilib(base, os, force_first_on_device) // Convert the multilib selection into a list of Targets. targets, err := decodeMultilibTargets(multilib, osTargets, prefer32) Loading Loading @@ -730,7 +731,7 @@ func addTargetProperties(m Module, target Target, multiTargets []Target, primary // multilib from the factory's call to InitAndroidArchModule if none was set. For modules that // called InitAndroidMultiTargetsArchModule it always returns "common" for multilib, and returns // the actual multilib in extraMultilib. func decodeMultilib(base *ModuleBase, os OsType) (multilib, extraMultilib string) { func decodeMultilib(base *ModuleBase, os OsType, force_first_on_device bool) (multilib, extraMultilib string) { // First check the "android.compile_multilib" or "host.compile_multilib" properties. switch os.Class { case Device: Loading @@ -749,6 +750,13 @@ func decodeMultilib(base *ModuleBase, os OsType) (multilib, extraMultilib string multilib = base.commonProperties.Default_multilib } // If a device is configured with multiple targets, this option // force all device targets that prefer32 to be compiled only as // the first target. if force_first_on_device && os.Class == Device && (multilib == "prefer32" || multilib == "first_prefer32") { multilib = "first" } if base.commonProperties.UseTargetVariants { // Darwin has the concept of "universal binaries" which is implemented in Soong by // building both x86_64 and arm64 variants, and having select module types know how to Loading
android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1701,6 +1701,10 @@ func (c *deviceConfig) GenerateAidlNdkPlatformBackend() bool { return c.config.productVariables.GenerateAidlNdkPlatformBackend } func (c *config) ForceMultilibFirstOnDevice() bool { return c.productVariables.ForceMultilibFirstOnDevice } // The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs. // Such lists are used in the build system for things like bootclasspath jars or system server jars. // The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a Loading
android/variable.go +2 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,8 @@ type productVariables struct { SepolicyFreezeTestExtraPrebuiltDirs []string `json:",omitempty"` GenerateAidlNdkPlatformBackend bool `json:",omitempty"` ForceMultilibFirstOnDevice bool `json:",omitempty"` } func boolPtr(v bool) *bool { Loading