Remove BUILDING_LIBART macro. am: 8ffaef9fbd am: d864a91128
Original change: https://android-review.googlesource.com/c/platform/art/+/1706847
Change-Id: I6a11d6df78559df842d37d2ea2d50cffa66e9050
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index 84f3418..1b02119 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -120,7 +120,6 @@
},
},
generated_sources: ["art_libartbase_operator_srcs"],
- cflags: ["-DBUILDING_LIBART=1"],
export_include_dirs: ["."],
}
diff --git a/libartbase/base/macros.h b/libartbase/base/macros.h
index e6f72ff..eec73cb 100644
--- a/libartbase/base/macros.h
+++ b/libartbase/base/macros.h
@@ -104,4 +104,7 @@
#define LOCKABLE CAPABILITY("mutex")
#define SHARED_LOCKABLE SHARED_CAPABILITY("mutex")
+#define HIDDEN __attribute__((visibility("hidden")))
+#define EXPORT __attribute__((visibility("default")))
+
#endif // ART_LIBARTBASE_BASE_MACROS_H_
diff --git a/libprofile/Android.bp b/libprofile/Android.bp
index 2edf821..fa10dfa 100644
--- a/libprofile/Android.bp
+++ b/libprofile/Android.bp
@@ -68,7 +68,6 @@
},
},
//generated_sources: ["art_libartbase_operator_srcs"],
- cflags: ["-DBUILDING_LIBART=1"],
export_include_dirs: ["."],
}
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 8181cd9..95666b9 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -416,7 +416,6 @@
],
},
},
- cflags: ["-DBUILDING_LIBART=1"],
generated_sources: [
"art_operator_srcs"
],
diff --git a/runtime/entrypoints/runtime_asm_entrypoints.h b/runtime/entrypoints/runtime_asm_entrypoints.h
index 9f47034..d2096ec 100644
--- a/runtime/entrypoints/runtime_asm_entrypoints.h
+++ b/runtime/entrypoints/runtime_asm_entrypoints.h
@@ -19,17 +19,14 @@
#include "deoptimization_kind.h"
+#include "base/macros.h"
#include "jni.h"
-namespace art {
+namespace art HIDDEN {
class ArtMethod;
class Thread;
-#ifndef BUILDING_LIBART
-#error "File and symbols only for use within libart."
-#endif
-
extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject);
static inline const void* GetJniDlsymLookupStub() {
return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub);