diff options
author | 2017-08-02 18:28:08 -0700 | |
---|---|---|
committer | 2017-08-02 19:26:41 -0700 | |
commit | 84f82b9972ec29bd05b1575ae6d638255be2f285 (patch) | |
tree | 82ab908d83f7ecb5d67180aeff4814d873de28e8 /runtime/class_loader_context.h | |
parent | 1ccf61377290451b4e5cfe29ece5de3c8c585e0e (diff) |
Stop using the runtime classpath in dex2oat
Use only --class-loader-context to infer the classpath that should be used
for compilation.
The tests and benchmarks no longer rely on --runtime-arg --classpath being
passed to dex2oat.
Bug: 36044779
Test: m test-art-host
Change-Id: Iba4cb3489f4a1a4a421071e1889d806d6c1d0738
Diffstat (limited to 'runtime/class_loader_context.h')
-rw-r--r-- | runtime/class_loader_context.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/class_loader_context.h b/runtime/class_loader_context.h index 85299d41c0..9afa880da4 100644 --- a/runtime/class_loader_context.h +++ b/runtime/class_loader_context.h @@ -34,9 +34,6 @@ class OatFile; // Utility class which holds the class loader context used during compilation/verification. class ClassLoaderContext { public: - // Creates an empty context (with no class loaders). - ClassLoaderContext(); - ~ClassLoaderContext(); // Opens requested class path files and appends them to ClassLoaderInfo::opened_dex_files. @@ -126,6 +123,10 @@ class ClassLoaderContext { static std::unique_ptr<ClassLoaderContext> CreateContextForClassLoader(jobject class_loader, jobjectArray dex_elements); + // Returns the default class loader context to be used when none is specified. + // This will return a context with a single and empty PathClassLoader. + static std::unique_ptr<ClassLoaderContext> Default(); + private: enum ClassLoaderType { kInvalidClassLoader = 0, @@ -151,6 +152,9 @@ class ClassLoaderContext { explicit ClassLoaderInfo(ClassLoaderType cl_type) : type(cl_type) {} }; + // Creates an empty context (with no class loaders). + ClassLoaderContext(); + // Constructs an empty context. // `owns_the_dex_files` specifies whether or not the context will own the opened dex files // present in the class loader chain. If `owns_the_dex_files` is true then OpenDexFiles cannot |