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
diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp
index 3f2505c..66d7531 100644
--- a/libnativeloader/native_loader_test.cpp
+++ b/libnativeloader/native_loader_test.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#if defined(ART_TARGET_ANDROID)
+
#include <dlfcn.h>
#include <memory>
#include <unordered_map>
@@ -700,3 +702,5 @@
} // namespace nativeloader
} // namespace android
+
+#endif // defined(ART_TARGET_ANDROID)