diff options
| author | 2015-03-16 14:32:16 -0700 | |
|---|---|---|
| committer | 2015-03-25 14:44:44 -0700 | |
| commit | 6343411e52d2a59cd716cb47a85ebd0d68e61a3c (patch) | |
| tree | 64f9be60771f0e40fcea0706ab14afffc95f9d3a /runtime/oat_file_assistant.cc | |
| parent | 19c1c124fb92a13c5f59dfde8f638b7bf9b73abb (diff) | |
Store odex files in oat/<isa>/ directory.
Previously odex files were stored alongside the dex location as:
dex location: /foo/bar/base.apk
odex location: /foo/bar/<isa>/base.odex
This changes where odex files are stored, adding an "oat" directory:
dex location: /foo/bar/base.apk
odex location: /foo/bar/oat/<isa>/base.odex
See also the corresponding change in platform/build and
platform/frameworks/native.
Bug: 19550105
Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265
Diffstat (limited to 'runtime/oat_file_assistant.cc')
| -rw-r--r-- | runtime/oat_file_assistant.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc index 9a17b01c02..d92f59bde6 100644 --- a/runtime/oat_file_assistant.cc +++ b/runtime/oat_file_assistant.cc @@ -737,18 +737,19 @@ bool OatFileAssistant::DexFilenameToOdexFilename(const std::string& location, CHECK(error_msg != nullptr); // The odex file name is formed by replacing the dex_location extension with - // .odex and inserting an isa directory. For example: + // .odex and inserting an oat/<isa> directory. For example: // location = /foo/bar/baz.jar - // odex_location = /foo/bar/<isa>/baz.odex + // odex_location = /foo/bar/oat/<isa>/baz.odex - // Find the directory portion of the dex location and add the isa directory. + // Find the directory portion of the dex location and add the oat/<isa> + // directory. size_t pos = location.rfind('/'); if (pos == std::string::npos) { *error_msg = "Dex location " + location + " has no directory."; return false; } std::string dir = location.substr(0, pos+1); - dir += std::string(GetInstructionSetString(isa)); + dir += "oat/" + std::string(GetInstructionSetString(isa)); // Find the file portion of the dex location. std::string file; |