platform_build_soong/dexpreopt
Ulya Trafimovich 65556a87d3 Preserve <uses-library> order in dexpreopt.config files.
Library order is important because it is used to construct class loader
context, which is then written into OAT/ODEX files and chacked against
class loader context constructed by PackageManager on the device. If the
orders are different, dexpreopted code is rejected.

Soong avoids using Go maps for class loader context representation
precisely for that reason. However, for the modules defined in makefiles
dexpreopt configs were serialized to JSON and unmarshaled to Go maps,
which resulted in wrong order of libraries. This CL changes Go
representation of class loader contexts imported from JSON and makes the
order stable.

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors
Change-Id: I15f51617f9573c0bbcb324cf2592daf719cad586
2021-02-11 16:58:51 +00:00
..
dexpreopt_gen Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
Android.bp Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
OWNERS Add an owners file for dexpreopt files. 2018-12-18 20:28:06 +00:00
class_loader_context.go Preserve <uses-library> order in dexpreopt.config files. 2021-02-11 16:58:51 +00:00
class_loader_context_test.go Remove obsolete class loader context API and update unit tests. 2021-01-05 15:41:55 +00:00
config.go Write module dexpreopt.config for Make. 2021-01-28 06:29:13 +00:00
dexpreopt.go Pass pctx and ctx to NewRuleBuilder 2020-12-01 16:22:16 -08:00
dexpreopt_test.go Allow createGlobalSoongConfig() to be used from tests 2021-01-21 15:44:30 +00:00
testing.go Make dexpreopt tools available for all java tests 2021-01-25 19:15:19 +00:00