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/mirror/art_method.h b/runtime/mirror/art_method.h
index a18e1719..a61698d 100644
--- a/runtime/mirror/art_method.h
+++ b/runtime/mirror/art_method.h
@@ -20,7 +20,6 @@
#include "class.h"
#include "dex_file.h"
#include "invoke_type.h"
-#include "locks.h"
#include "modifiers.h"
#include "object.h"
#include "object_callbacks.h"
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index ded4e0a..4e2c624 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -21,6 +21,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "cutils/atomic-inline.h"
+#include "monitor.h"
#include "object_reference.h"
#include "offsets.h"
#include "runtime.h"
@@ -30,7 +31,6 @@
class ImageWriter;
class LockWord;
-class Monitor;
struct ObjectOffsets;
class Thread;
template <typename T> class SirtRef;
@@ -64,7 +64,7 @@
static constexpr bool kCheckFieldAssignments = false;
// C++ mirror of java.lang.Object
-class MANAGED Object {
+class MANAGED LOCKABLE Object {
public:
static MemberOffset ClassOffset() {
return OFFSET_OF_OBJECT_MEMBER(Object, klass_);
@@ -104,9 +104,9 @@
uint32_t GetLockOwnerThreadId();
mirror::Object* MonitorEnter(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
- EXCLUSIVE_LOCK_FUNCTION(monitor_lock_);
+ EXCLUSIVE_LOCK_FUNCTION();
bool MonitorExit(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
- UNLOCK_FUNCTION(monitor_lock_);
+ UNLOCK_FUNCTION();
void Notify(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void NotifyAll(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void Wait(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h
index 94869e5..72f281d 100644
--- a/runtime/mirror/object_reference.h
+++ b/runtime/mirror/object_reference.h
@@ -17,8 +17,8 @@
#ifndef ART_RUNTIME_MIRROR_OBJECT_REFERENCE_H_
#define ART_RUNTIME_MIRROR_OBJECT_REFERENCE_H_
+#include "base/mutex.h"
#include "globals.h"
-#include "locks.h"
namespace art {
namespace mirror {