Skip to content

Commit

Permalink
Turns out gtest still prefers the system <tr1/tuple> over it's own
Browse files Browse the repository at this point in the history
implementation. Force the internal one to unbreak clang selfhost on linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105386 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Jun 3, 2010
1 parent 30ef0e5 commit 8ef297e
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unittests/Makefile.unittest
Original file line number Diff line number Diff line change
@@ -23,6 +23,9 @@ LLVMUnitTestExe = $(BuildMode)/$(TESTNAME)Tests$(EXEEXT)
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.
CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE

TESTLIBS = -lGoogleTest -lUnitTestMain

3 changes: 3 additions & 0 deletions utils/unittest/UnitTestMain/Makefile
Original file line number Diff line number Diff line change
@@ -18,5 +18,8 @@ REQUIRES_RTTI = 1
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.
CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE

include $(LEVEL)/Makefile.common
3 changes: 3 additions & 0 deletions utils/unittest/googletest/Makefile
Original file line number Diff line number Diff line change
@@ -21,6 +21,9 @@ REQUIRES_RTTI = 1
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.
CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE

ifeq ($(HOST_OS),MingW)
CPP.Flags += -DGTEST_OS_WINDOWS=1

0 comments on commit 8ef297e

Please sign in to comment.