Various GCC 3.6 and clang build fixes.
Remove #error in common_test.h that fires with clang build and replace with
runtime error.
Fix bit rot caused by not compiling with Wthread-safety.
Fix clang build issues in compiler relating to missing header file definitions
in object files.
Other minor build and tidying issues.
Change-Id: Ife829ab0664581936155be524de46e6181c750b0
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 37d2996..292e41c 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -444,6 +444,8 @@
static void OpenClassPathFiles(const std::string& class_path, std::vector<const DexFile*>& dex_files) {
std::vector<std::string> parsed;
Split(class_path, ':', parsed);
+ // Take Locks::mutator_lock_ so that lock ordering on the ClassLinker::dex_lock_ is maintained.
+ ScopedObjectAccess soa(Thread::Current());
for (size_t i = 0; i < parsed.size(); ++i) {
if (DexFilesContains(dex_files, parsed[i])) {
continue;
@@ -498,7 +500,7 @@
const char* dex_location = dex_locations[i];
const DexFile* dex_file = DexFile::Open(dex_filename, dex_location);
if (dex_file == NULL) {
- LOG(WARNING) << "could not open .dex from file " << dex_filename;
+ LOG(WARNING) << "Could not open .dex from file '" << dex_filename << "'\n";
++failure_count;
} else {
dex_files.push_back(dex_file);