summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-09 14:06:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-09 14:06:14 +0000
commit7be06900a824babd17c5f4e018c08aeca9ba57e3 (patch)
treee9a7c6ad493e0128c784dcbc6482cffbead570b3 /cmds
parent8ee0b48d607fd6afc5e75f56bdadce19272c60ff (diff)
parent9f777008eaead3cb9cee80d0c00e5a3d55de9de7 (diff)
downloadframeworks_base-7be06900a824babd17c5f4e018c08aeca9ba57e3.zip
frameworks_base-7be06900a824babd17c5f4e018c08aeca9ba57e3.tar.gz
frameworks_base-7be06900a824babd17c5f4e018c08aeca9ba57e3.tar.bz2
am 9f777008: am 05f980d4: am d4b64409: Merge "Make zygotes aware of their supported ABIs."
* commit '9f777008eaead3cb9cee80d0c00e5a3d55de9de7': 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) {