platform_build_soong/dexpreopt
Ulya Trafimovich 8130c482ab Move part of logic from construct_context.py to Soong.
construct_context.py is a script that runs at Ninja stage and constructs
class loader context arguments for dex2oat. Previously it accepted lists
of library paths and concatenated them into one class loader context
string. The script also handled the dependency of "android.hidl.manager"
on "android.hidl.base" that is not tracked by the build system and must
be handled in a special way.

Now that class loader context representation is going to change from
flat lists to trees, passing paths to individual libraries as script
arguments is no longer possible, because a list of paths cannot
represent a class loader context tree. Passing the trees in a serialized
form is also inconvenient, because the script would have to parse them,
which would complicate it a lot.

Therefore this patch ports all the concatenation and "android.hidl.base"
handling to Soong. It is not possible to port the remaining script to
Soong because Soong has no information about the targetSdkVersiion of
the dexpreopted apps (it is in the manifest and sometimes in an APK, and
has to be extracted at Ninja time).

Test: construct_context_test.py
Test: new subtests in TestUsesLibs
Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: Icdb03cf00d1e27e4cff3844b89bfaec4de502dd7
2020-10-27 17:05:30 +00:00
..
dexpreopt_gen Fix bpfmt issues and add bpfmt to preupload checks 2020-06-29 09:14:08 +02:00
Android.bp Reland: Get the dex2oat host tool path from module dependency on the 2020-02-13 17:46:48 +00:00
OWNERS Add an owners file for dexpreopt files. 2018-12-18 20:28:06 +00:00
config.go Unify handling of compat and normal libs in class loader contexts. 2020-10-27 17:05:30 +00:00
dexpreopt.go Move part of logic from construct_context.py to Soong. 2020-10-27 17:05:30 +00:00
dexpreopt_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
testing.go Reland: Get the dex2oat host tool path from module dependency on the 2020-02-13 17:46:48 +00:00