diff options
author | Tanya Lattner <tonic@nondot.org> | 2010-03-30 23:03:09 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2010-03-30 23:03:09 +0000 |
commit | e9e7d08fc6e2a8bd6b3d9360d24dbcfd90eacce5 (patch) | |
tree | b7cc30669f4345abd3506e79a2c333b2578fedf0 | |
parent | 25e67eda533e7bbf5cbf8b9ba3df96c06ef368b4 (diff) | |
download | llvm-e9e7d08fc6e2a8bd6b3d9360d24dbcfd90eacce5.zip llvm-e9e7d08fc6e2a8bd6b3d9360d24dbcfd90eacce5.tar.gz llvm-e9e7d08fc6e2a8bd6b3d9360d24dbcfd90eacce5.tar.bz2 |
Merge 98074 from mainline. Fix for PR5893.
llvm-svn: 99956
-rw-r--r-- | llvm/unittests/Makefile.unittest | 18 | ||||
-rw-r--r-- | llvm/utils/unittest/googletest/Makefile | 9 |
2 files changed, 19 insertions, 8 deletions
diff --git a/llvm/unittests/Makefile.unittest b/llvm/unittests/Makefile.unittest index b1c1d2c..8fbcfd2 100644 --- a/llvm/unittests/Makefile.unittest +++ b/llvm/unittests/Makefile.unittest @@ -14,18 +14,20 @@ # Set up variables for building a unit test. ifdef TESTNAME -CPP.Flags += -DGTEST_HAS_RTTI=0 -# gcc's TR1 <tuple> header depends on RTTI, so force googletest to use -# its own tuple implementation. When we import googletest >=1.4.0, we -# can drop this line. -CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 - include $(LEVEL)/Makefile.common LLVMUnitTestExe = $(BuildMode)/$(TESTNAME)Tests$(EXEEXT) -CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/ -CPP.Flags += $(NO_VARIADIC_MACROS) +# Note that these flags are duplicated when building GoogleTest itself in +# utils/unittest/googletest/Makefile; ensure that any changes are made to both. +CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include +CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) +CPP.Flags += -DGTEST_HAS_RTTI=0 +# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not +# supported by Clang, so force googletest to use its own tuple implementation. +# When we import googletest >=1.4.0, we can drop this line. +CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 + TESTLIBS = -lGoogleTest -lUnitTestMain ifeq ($(ENABLE_SHARED), 1) diff --git a/llvm/utils/unittest/googletest/Makefile b/llvm/utils/unittest/googletest/Makefile index 15bbf4e..688a5bd 100644 --- a/llvm/utils/unittest/googletest/Makefile +++ b/llvm/utils/unittest/googletest/Makefile @@ -14,8 +14,17 @@ include $(LEVEL)/Makefile.config LIBRARYNAME = GoogleTest BUILD_ARCHIVE = 1 REQUIRES_RTTI = 1 + +# Note that these flags are duplicated when building individual tests in +# unittests/Makefile.unittest; ensure that any changes are made to both. CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) +CPP.Flags += -DGTEST_HAS_RTTI=0 +# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not +# supported by Clang, so force googletest to use its own tuple implementation. +# When we import googletest >=1.4.0, we can drop this line. +CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 + ifeq ($(HOST_OS),MingW) CPP.Flags += -DGTEST_OS_WINDOWS=1 |