diff options
| author | 2011-10-13 14:58:47 -0700 | |
|---|---|---|
| committer | 2011-10-14 00:24:28 -0700 | |
| commit | b7bbba49d88eae58223d9878da4069bf6d7140bf (patch) | |
| tree | 00d1a0758d762903e648bb550434320822228c46 /src/utils.cc | |
| parent | 30646836b4a1c6e5e80ddaea246cf9669eaa0628 (diff) | |
Add oatopt drop in replacement for dexopt
Change-Id: I094375230af2d9a88e30245b390cac71be7b50f4
Diffstat (limited to 'src/utils.cc')
| -rw-r--r-- | src/utils.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.cc b/src/utils.cc index bc51c2a254..4f4cd8fc44 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -514,6 +514,14 @@ std::string GetArtCacheOrDie() { return art_cache; } +std::string GetArtCacheOatFilenameOrDie(const std::string& location) { + std::string art_cache = GetArtCacheOrDie(); + CHECK_EQ(location[0], '/'); + std::string cache_file(location, 1); // skip leading slash + std::replace(cache_file.begin(), cache_file.end(), '/', '@'); + return art_cache + "/" + cache_file; +} + } // namespace art // Neither bionic nor glibc exposes gettid(2). |