Change the Mac OS 10.5 workaround so it can't be overridden on the command-line.
Change-Id: I3ad8fd2872cb2ea92a3d6154a395effd7c6fc3ef
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 613ba67..747b613 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -478,10 +478,6 @@
bool dump_stats = kIsDebugBuild;
bool dump_timings = kIsDebugBuild;
-#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- thread_count = 1;
-#endif
-
for (int i = 0; i < argc; i++) {
const StringPiece option(argv[i]);
bool log_options = false;
@@ -556,6 +552,12 @@
}
}
+#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+ // Something is broken on Mac OS 10.5, and we don't have direct access to any machines running it.
+ // Restricting dex2oat to a single thread on Mac OS 10.5 appears to be a workaround.
+ thread_count = 1;
+#endif
+
if (oat_filename.empty() && oat_fd == -1) {
Usage("Output must be supplied with either --oat-file or --oat-fd");
}