summaryrefslogtreecommitdiff
path: root/test/MultiDex/Second.java
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2017-06-13 21:48:45 -0700
committerCalin Juravle <calin@google.com>2017-07-10 17:08:06 -0700
commit87e2cb64ab02d9bdc48255130c67168c809c5f62 (patch)
tree2c4610937776365e440f9ec689daf737b111c967 /test/MultiDex/Second.java
parentc5e4a53252bda0052fb642424e9f5ba908603eb8 (diff)
Add support for processing class loader contexts
Initial support for recognizing the class loader contexts. In order to correctly compile dex files which at runtime are loaded with a non-trivial class loader chain we need to make dex2oat aware of the precise runtime context. This CL adds the infrastructure to process arbitrary and arbitrary chain of class loaders. ClassLoaderContext is able to parse a class loader spec from a string and create the runtime structure based on it. The integration with dex2oat and oat file assistant will follow up. The string specification looks like "PCL[lib1.dex:lib2.dex];DLC[lib3.dex]" It describes how the class loader chain should be build in order to ensure classes are resolved during dex2aot as they would be resolved at runtime. This spec will be encoded in the oat file. If at runtime the dex file will be loaded in a different context, the oat file will be rejected. The chain is interpreted in the natural 'parent order', meaning that class loader 'i+1' will be the parent of class loader 'i'. The compilation sources will be added to the classpath of the last class loader. This allows the compiled dex files to be loaded at runtime in a class loader that contains other dex files as well (e.g. shared libraries). Note that we accept chains for which the source dex files specified with --dex-file are found in the classpath. In this case the source dex files will be removed from the any class loader's classpath possibly resulting in empty class loaders. * This is the first CL, which adds the infrastructure for processing a class loader context. Currently it CHECKS that only a single PathClassLoader is created. Test: m test-art-host Bug: 38138251 Change-Id: I312aa12b5732288f3c1df4746b5775a32e0bfb04
Diffstat (limited to 'test/MultiDex/Second.java')
0 files changed, 0 insertions, 0 deletions