summaryrefslogtreecommitdiff
path: root/libnativeloader/public_libraries.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2020-04-24 15:43:48 +0100
committerNicolas Geoffray <ngeoffray@google.com>2020-04-27 09:34:03 +0000
commit7ca8b67c21513d3cd236f47332afdd1be1cb1569 (patch)
tree4e226c25734451053b85d24e5176abcc299e3986 /libnativeloader/public_libraries.cpp
parent5c25e537f59c2f87a57097ad3eb2f70d8c54de23 (diff)
Use ART_TARGET_ANDROID instead of __ANDROID__
On golem, we build for ART_TARGET_LINUX, which doesn't have support for linkerconfig. Therefore, guard all linker namespace code on ART_TARGET_ANDROID instead of __ANDROID__ (which is unfortunately not under ART's control). Test: build for golem and run Bug: 154074847 Change-Id: I7a2b81918177704b42d8aafbd6d7e9d06d34e5f4
Diffstat (limited to 'libnativeloader/public_libraries.cpp')
-rw-r--r--libnativeloader/public_libraries.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp
index 258dbf69f0..4b56dc2a16 100644
--- a/libnativeloader/public_libraries.cpp
+++ b/libnativeloader/public_libraries.cpp
@@ -31,7 +31,7 @@
#include <android-base/strings.h>
#include <log/log.h>
-#if defined(__ANDROID__)
+#if defined(ART_TARGET_ANDROID)
#include <android/sysprop/VndkProperties.sysprop.h>
#endif
@@ -394,7 +394,7 @@ const std::string& apex_jni_libraries(const std::string& apex_ns_name) {
}
bool is_product_vndk_version_defined() {
-#if defined(__ANDROID__)
+#if defined(ART_TARGET_ANDROID)
return android::sysprop::VndkProperties::product_vndk_version().has_value();
#else
return false;
@@ -402,7 +402,7 @@ bool is_product_vndk_version_defined() {
}
std::string get_vndk_version(bool is_product_vndk) {
-#if defined(__ANDROID__)
+#if defined(ART_TARGET_ANDROID)
if (is_product_vndk) {
return android::sysprop::VndkProperties::product_vndk_version().value_or("");
}