summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-09 14:02:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-09 14:02:18 +0000
commit9f777008eaead3cb9cee80d0c00e5a3d55de9de7 (patch)
tree95241374d0e30c18b265fb376a65ca3ec84d8a70 /cmds
parent97175deb446cdaca7f3910b71940cb443bda3cc4 (diff)
parent05f980d42d4926ab2130cdcf9e646eb610a7080b (diff)
downloadframeworks_base-9f777008eaead3cb9cee80d0c00e5a3d55de9de7.zip
frameworks_base-9f777008eaead3cb9cee80d0c00e5a3d55de9de7.tar.gz
frameworks_base-9f777008eaead3cb9cee80d0c00e5a3d55de9de7.tar.bz2
am 05f980d4: am d4b64409: Merge "Make zygotes aware of their supported ABIs."
* commit '05f980d42d4926ab2130cdcf9e646eb610a7080b': Make zygotes aware of their supported ABIs.
Diffstat (limited to 'cmds')
-rw-r--r--cmds/app_process/app_main.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index e0290c3..3e8d6a0 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -10,8 +10,9 @@
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <utils/Log.h>
-#include <cutils/process_name.h>
#include <cutils/memory.h>
+#include <cutils/process_name.h>
+#include <cutils/properties.h>
#include <cutils/trace.h>
#include <android_runtime/AndroidRuntime.h>
@@ -135,6 +136,12 @@ static size_t computeArgBlockSize(int argc, char* const argv[]) {
return (end - start);
}
+#if defined(__LP64__)
+static const char ABI_LIST_PROPERTY[] = "ro.product.cpu.abilist64";
+#else
+static const char ABI_LIST_PROPERTY[] = "ro.product.cpu.abilist32";
+#endif
+
int main(int argc, char* const argv[])
{
AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv));
@@ -205,6 +212,17 @@ int main(int argc, char* const argv[])
args.add(String8("start-system-server"));
}
+ char prop[PROP_VALUE_MAX];
+ if (property_get(ABI_LIST_PROPERTY, prop, NULL) == 0) {
+ LOG_ALWAYS_FATAL("app_process: Unable to deterimine ABI list from property %s.",
+ ABI_LIST_PROPERTY);
+ return 11;
+ }
+
+ String8 abiFlag("--abi-list=");
+ abiFlag.append(prop);
+ args.add(abiFlag);
+
// In zygote mode, pass all remaining arguments to the zygote
// main() method.
for (; i < argc; ++i) {