ART: Extend bionic TLS use to host bionic
Use __BIONIC__ instead of ART_TARGET_ANDROID for bionic TLS usage.
Bug: 138329277
Test: m test-art-host
Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
Change-Id: I7dc605c6700323303d9c9503d3aecc4fddef8d45
diff --git a/runtime/thread-current-inl.h b/runtime/thread-current-inl.h
index 9241b1f..787ec5b 100644
--- a/runtime/thread-current-inl.h
+++ b/runtime/thread-current-inl.h
@@ -19,7 +19,7 @@
#include "thread.h"
-#ifdef ART_TARGET_ANDROID
+#ifdef __BIONIC__
#include <bionic_tls.h> // Access to our own TLS slot.
#endif
@@ -33,7 +33,7 @@
if (!is_started_) {
return nullptr;
} else {
-#ifdef ART_TARGET_ANDROID
+#ifdef __BIONIC__
void* thread = __get_tls()[TLS_SLOT_ART_THREAD_SELF];
#else
void* thread = pthread_getspecific(Thread::pthread_key_self_);