summaryrefslogtreecommitdiff
path: root/cmds/app_process/app_main.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-03-23 11:27:04 -0700
committerElliott Hughes <enh@google.com>2018-03-23 11:27:04 -0700
commita1194cb636ca058cc3d11f17200fd757302aca67 (patch)
tree558d6ddf081cb2e5d0a4a0b04026797682a59a5b /cmds/app_process/app_main.cpp
parent6941fcd88cbc10c210eb8264caa6d193404cd840 (diff)
Use ABI_STRING.
Bug: N/A Test: builds Change-Id: I5a9d2a6604887f1f0e9583086e012a086042b7df
Diffstat (limited to 'cmds/app_process/app_main.cpp')
-rw-r--r--cmds/app_process/app_main.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 1671337511b7..12083b6fe20b 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <android-base/macros.h>
#include <binder/IPCThreadState.h>
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
@@ -137,27 +138,12 @@ static size_t computeArgBlockSize(int argc, char* const argv[]) {
}
static void maybeCreateDalvikCache() {
-#if defined(__aarch64__)
- static const char kInstructionSet[] = "arm64";
-#elif defined(__x86_64__)
- static const char kInstructionSet[] = "x86_64";
-#elif defined(__arm__)
- static const char kInstructionSet[] = "arm";
-#elif defined(__i386__)
- static const char kInstructionSet[] = "x86";
-#elif defined (__mips__) && !defined(__LP64__)
- static const char kInstructionSet[] = "mips";
-#elif defined (__mips__) && defined(__LP64__)
- static const char kInstructionSet[] = "mips64";
-#else
-#error "Unknown instruction set"
-#endif
const char* androidRoot = getenv("ANDROID_DATA");
LOG_ALWAYS_FATAL_IF(androidRoot == NULL, "ANDROID_DATA environment variable unset");
char dalvikCacheDir[PATH_MAX];
const int numChars = snprintf(dalvikCacheDir, PATH_MAX,
- "%s/dalvik-cache/%s", androidRoot, kInstructionSet);
+ "%s/dalvik-cache/" ABI_STRING, androidRoot);
LOG_ALWAYS_FATAL_IF((numChars >= PATH_MAX || numChars < 0),
"Error constructing dalvik cache : %s", strerror(errno));