summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2017-06-28 10:59:03 -0700
committerCalin Juravle <calin@google.com>2017-07-10 17:08:08 -0700
commit1ce7085831316272f071a01d14eea8048264a7bf (patch)
tree35e527413824324e82398fdc6bd89c883366bdb6 /compiler/optimizing/instruction_builder.cc
parent87e2cb64ab02d9bdc48255130c67168c809c5f62 (diff)
Add support for class loader context in dex2oat
The context can be passed to dex2oat using '--class-loader- context=<string spec>'. It accepts a string specifying the intended runtime loading context for the compiled dex files. e.g. --class-loader-context=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 the compiler will be tolerant if the source dex files specified with --dex-file are found in the classpath. The source dex files will be removed from the any class loader's classpath possibly resulting in empty class loaders. Test: m test-art-host Bug: 38138251 Change-Id: I3446ac7b2949d367dbc6d15729d3b203791eaac0
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
0 files changed, 0 insertions, 0 deletions