platform_build_soong/apex
Spandan Das 7fd531f5d1 Identify profile providing apexes using ApexInfo
`com.android.art` and its overrides include a `etc/boot-image.prof`
which is used on device for profile guided dexopt.
```
$ deapexer list <path_in_product_out>/com.android.art.apex | grep
boot-image
$ deapexer list <path_in_product_out>/com.google.android.art.apex | grep
boot-image
```

To identify that we should include a boot-image.prof in the override
apexes, we currently look at ApexInfo.InApexVariants in the context of
art's bootclasspath fragment module. InApexVariants are colated based on
the min_sdk_version of the top-level apex. At ToT, we have a single
variant of `art-bootlcasspath-fragment` for aosp art apex, google art
apex and google go art apex.

When google go art apex overrides the min_sdk_version, ApexInfo is
cleaved, and two distinct variants of art-bootclasspath-fragment are
created. The one corresponding to go art apex does not know we should
include boot-image.prof

To fix this, use AllApexInfoProvider instead. If any of the apexInfos
corresponds to com.android.art, include etc/boot-image.prof

Test: Added a unit test
Test: With https://b.corp.google.com/issues/345173231#comment2 reverted,
m com.google.android.go.art && deapexer list <apex> # verified that
boot-image.prof exists

Bug: 345173231
Bug: 295311875

Change-Id: I5a0e8f74725388f05343c64f268260b1eb139ae5
2024-06-05 21:32:23 +00:00
..
aconfig_test.go Soong: remove obsolete proto lib from unit test 2024-05-23 11:43:42 +00:00
Android.bp Remove VNDK information from CC and APEX tests 2024-03-28 15:15:01 +09:00
androidmk.go Propagate AconfigFiles in ModuleBase. 2024-01-24 23:45:12 +00:00
apex.go Use OutputFilesProvider on bpf 2024-06-04 22:09:13 -07:00
apex_sdk_member.go Add apexes property to sdk 2022-07-06 15:58:43 +00:00
apex_singleton.go Generate info about the selected app variant in platform builds 2024-03-14 18:12:30 +00:00
apex_test.go Override modules should always override source modules 2024-05-29 00:06:32 +00:00
bootclasspath_fragment_test.go Identify profile providing apexes using ApexInfo 2024-06-05 21:32:23 +00:00
builder.go Remove Device VNDK version usage from Soong 2024-04-05 01:57:32 +00:00
classpath_element_test.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
deapexer.go Propagate profile_guided requirement of imports to top-level apex 2024-01-30 18:04:52 +00:00
dexpreopt_bootjars_test.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00
key.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
platform_bootclasspath_test.go Restrict validateApexClasspathFragments to active apex prebuilts 2024-05-21 18:59:23 +00:00
prebuilt.go Restrict validateApexClasspathFragments to active apex prebuilts 2024-05-21 18:59:23 +00:00
systemserver_classpath_fragment_test.go Propagate profile_guided requirement of imports to top-level apex 2024-01-30 18:04:52 +00:00
TEST_MAPPING Add TEST_MAPPING for build/soong/apex 2019-08-07 17:33:24 +09:00
testing.go Add allowed-deps tests 2023-04-27 09:56:04 +09:00
vndk.go Remove PlatformVndkVersion property 2024-04-01 16:37:20 +09:00