platform_build_soong/dexpreopt
Jiakai Zhang f98da19a07 Refactor the contruction of the manifest check inputs.
This is a no-op change for a majority of cases.

Before this change, the contruction of the manifest check inputs is
confusing. It mutates uses_libs properties in place just for the
manifest check, by replacing module names with library names for
direct dependencies and merging library names from CLC for both direct
denpendencies and transitive denpendencies, and then constructs manifest
check inputs from those mutated uses_libs properties. This is
error-prone and leads to insistency: the goal is to check that the CLC
matches the manifest, but the inputs to the check don't reflect the CLC.

After this change, we no longer mutate uses_libs properties in place.
Instead, we maintain a separate list of missing denpendencies, and then
construct manifest check inputs directly from the CLC for all existing
libraries, no matter they are direct or transtive, and from the separate
list of missing libraries. This change makes the logic more
consistent and straightforward, and it also allows us to easily do the
next change, which is to propagate transtive missing denpendencies.

In fact, this change revealed several bugs around library optionality
and order in CLC construction, and fixed them.

Bug: 331528424
Test: m --no-skip-soong-tests
Ignore-AOSP-First: Depends on internal changes. Will cherry-pick once merged.
Merged-In: I0de82e76c47995b54aba9efd41538d950256a95f
Change-Id: I0de82e76c47995b54aba9efd41538d950256a95f
2024-04-15 11:15:41 +00:00
..
dexpreopt_gen Move CLC construction to Ninja phase. 2023-05-30 15:46:38 +01:00
Android.bp Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
class_loader_context.go Refactor the contruction of the manifest check inputs. 2024-04-15 11:15:41 +00:00
class_loader_context_test.go Use per-app package list to avoid unnecessary dexpreopt. 2023-06-28 17:59:56 +01:00
config.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00
dexpreopt.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00
DEXPREOPT_IMPLEMENTATION.md "master" was renamed "main". 2024-01-09 22:09:07 +00:00
dexpreopt_test.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00
testing.go Determine GC type based on BUILT_KERNEL_VERSION_FILE. 2024-02-02 09:23:37 +08:00