Skip to content

Commit 70236d4

Browse files
committed
Merge from mainline.
Probe for flags before using them to try to help compiling with compilers that don't support those flags. This hopefully will help gcc 3.X compile this code. http://llvm.org/PR3487 llvm-svn: 64514
1 parent fc95560 commit 70236d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/utils/unittest/googletest/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99

1010
LEVEL := ../../..
1111
include $(LEVEL)/Makefile.config
12+
NO_MISSING_FIELD_INITIALIZERS := $(shell $(CXX) -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers)
13+
NO_VAROADIC_MACROS := $(shell $(CXX) -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros)
14+
1215

1316
LIBRARYNAME = GoogleTest
1417
BUILD_ARCHIVE = 1
1518
CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/
16-
CPP.Flags += -Wno-missing-field-initializers -Wno-variadic-macros
19+
CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VAROADIC_MACROS)
1720

1821
include $(LEVEL)/Makefile.common

0 commit comments

Comments
 (0)