[TSan] use threadsafe death tests in TSan unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159533 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/Makefile.old b/lib/tsan/Makefile.old
index a0e83b6..4ee928c 100644
--- a/lib/tsan/Makefile.old
+++ b/lib/tsan/Makefile.old
@@ -46,7 +46,7 @@
 %.o: %.cc $(UNIT_TEST_HDR)
 	$(CXX) $(CXXFLAGS) $(CFLAGS) $(INCLUDES) -o $@ -c $<
 
-tsan_test: $(TEST_OBJ) $(UNIT_TEST_OBJ) $(RTL_TEST_OBJ) \
+tsan_test: $(UNIT_TEST_OBJ) $(RTL_TEST_OBJ) \
            $(SANITIZER_COMMON_TESTS_OBJ) $(LIBTSAN) $(GTEST_LIB)
 	$(CXX) $^ -o $@ $(LDFLAGS)
 
diff --git a/lib/tsan/rtl_tests/tsan_test.cc b/lib/tsan/rtl_tests/tsan_test.cc
index 2c903ae..7164140 100644
--- a/lib/tsan/rtl_tests/tsan_test.cc
+++ b/lib/tsan/rtl_tests/tsan_test.cc
@@ -34,6 +34,7 @@
   __tsan_func_entry(__builtin_return_address(0));
   __tsan_func_entry((char*)&main + 1);
 
+  testing::GTEST_FLAG(death_test_style) = "threadsafe";
   testing::InitGoogleTest(&argc, argv);
   int res = RUN_ALL_TESTS();