tsan: use -Wno-unused-private-field only for clang (gcc does not understand it)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159435 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/Makefile.old b/lib/tsan/Makefile.old
index b186304..1db2efc 100644
--- a/lib/tsan/Makefile.old
+++ b/lib/tsan/Makefile.old
@@ -3,11 +3,13 @@
CXXFLAGS = -fPIE -g -Wall -Werror -DTSAN_DEBUG=$(DEBUG)
# Silence warnings that Clang produces for gtest code.
# Use -Wno-attributes so that gcc doesn't complain about unknown warning types.
-CXXFLAGS += -Wno-unused-private-field -Wno-static-in-inline -Wno-attributes
+CXXFLAGS += -Wno-static-in-inline -Wno-attributes
ifeq ($(DEBUG), 0)
CXXFLAGS += -O3
endif
-
+ifeq ($(CXX), clang++)
+ CXXFLAGS+= -Wno-unused-private-field
+endif
LIBTSAN=rtl/libtsan.a
GTEST_ROOT=third_party/googletest