Enable clang for modules failed with TLS.
New 3.8 clang/llvm can compile TLS code now.
* For x86_64, still disable clang due to f128 bug.
* For b/25643775, arm and arm64, disable clang in unit tests.
* Fix thread_local_test.cpp to compile with clang and
limit gcc workaround only to arm and aarch64.
BUG: 25643775
Change-Id: Iecd006bf1fc417dbcce2c63343a59c4bf1fa77ea
diff --git a/tests/thread_local_test.cpp b/tests/thread_local_test.cpp
index aeba2ba..1422ed2 100644
--- a/tests/thread_local_test.cpp
+++ b/tests/thread_local_test.cpp
@@ -18,7 +18,8 @@
#include <stdint.h>
#include <string.h>
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__clang__) && \
+ (defined(__arm__) || defined(__aarch64__))
// Gcc has a bug with -O -fdata-section for the arm target: http://b/22772147.
// Until that bug is fixed, disable optimization since
// it is not essential for this test.