Support ANDROID_LOG_TAGS.
This is the dalvik-compatible solution to the "I don't want non-FATAL logging
in my test output" problem.
Change-Id: I51b7b883ce89604af4661696e7c7b041a0ef8211
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 6017ddb..47193e5 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -422,7 +422,7 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(Dex2Oat);
};
-bool ParseInt(const char* in, int* out) {
+static bool ParseInt(const char* in, int* out) {
char* end;
int result = strtol(in, &end, 10);
if (in == end || *end != '\0') {
@@ -432,9 +432,9 @@
return true;
}
-void OpenDexFiles(const std::vector<const char*>& dex_filenames,
- const std::vector<const char*>& dex_locations,
- std::vector<const DexFile*>& dex_files) {
+static void OpenDexFiles(const std::vector<const char*>& dex_filenames,
+ const std::vector<const char*>& dex_locations,
+ std::vector<const DexFile*>& dex_files) {
for (size_t i = 0; i < dex_filenames.size(); i++) {
const char* dex_filename = dex_filenames[i];
const char* dex_location = dex_locations[i];
@@ -447,7 +447,9 @@
}
}
-int dex2oat(int argc, char** argv) {
+static int dex2oat(int argc, char** argv) {
+ InitLogging();
+
// Skip over argv[0].
argv++;
argc--;