Enable annotalysis on clang ART builds.
Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.
Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index de06fb8..fdbf245 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -94,7 +94,7 @@
default_imt_(nullptr),
fault_message_lock_("Fault message lock"),
fault_message_(""),
- method_verifiers_lock_("Method verifiers lock"),
+ method_verifier_lock_("Method verifiers lock"),
threads_being_born_(0),
shutdown_cond_(new ConditionVariable("Runtime shutdown", *Locks::runtime_shutdown_lock_)),
shutting_down_(false),
@@ -851,7 +851,7 @@
}
}
{
- MutexLock mu(Thread::Current(), method_verifiers_lock_);
+ MutexLock mu(Thread::Current(), method_verifier_lock_);
for (verifier::MethodVerifier* verifier : method_verifiers_) {
verifier->VisitRoots(callback, arg);
}
@@ -1043,13 +1043,13 @@
void Runtime::AddMethodVerifier(verifier::MethodVerifier* verifier) {
DCHECK(verifier != nullptr);
- MutexLock mu(Thread::Current(), method_verifiers_lock_);
+ MutexLock mu(Thread::Current(), method_verifier_lock_);
method_verifiers_.insert(verifier);
}
void Runtime::RemoveMethodVerifier(verifier::MethodVerifier* verifier) {
DCHECK(verifier != nullptr);
- MutexLock mu(Thread::Current(), method_verifiers_lock_);
+ MutexLock mu(Thread::Current(), method_verifier_lock_);
auto it = method_verifiers_.find(verifier);
CHECK(it != method_verifiers_.end());
method_verifiers_.erase(it);