Merge "Enable test with clang aarch64."

This commit is contained in:
Chih-hung Hsieh 2016-03-04 21:26:05 +00:00 committed by Gerrit Code Review
commit cb9e4530a8

View file

@ -35,12 +35,7 @@ class ClassWithDtor {
std::string message;
};
#if defined(__clang__) && defined(__aarch64__)
// b/25642296, aarch64 clang compiled "thread_local" does not link.
static ClassWithDtor class_with_dtor;
#else
static thread_local ClassWithDtor class_with_dtor;
#endif
static void* thread_nop(void* arg) {
class_with_dtor.set_message(*static_cast<std::string*>(arg));
@ -52,12 +47,7 @@ TEST(thread_local, smoke) {
pthread_t t;
ASSERT_EQ(0, pthread_create(&t, nullptr, thread_nop, &msg));
ASSERT_EQ(0, pthread_join(t, nullptr));
#if defined(__clang__) && defined(__aarch64__)
GTEST_LOG_(INFO) << "Skipping test, b/25642296, "
<< "thread_local does not work with aarch64 clang/llvm.\n";
#else
ASSERT_EQ("dtor called.", class_with_dtor_output);
#endif
}
class ClassWithDtorForMainThread {
@ -74,13 +64,7 @@ class ClassWithDtorForMainThread {
};
static void thread_atexit_main() {
#if defined(__clang__) && defined(__aarch64__)
static ClassWithDtorForMainThread class_with_dtor_for_main_thread;
GTEST_LOG_(INFO) << "Skipping test, b/25642296, "
<< "thread_local does not work with aarch64 clang/llvm.\n";
#else
static thread_local ClassWithDtorForMainThread class_with_dtor_for_main_thread;
#endif
class_with_dtor_for_main_thread.set_message("d-tor for main thread called.");
exit(0);
}