Fix the build on xcode < 2.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31417 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/Makefile b/lib/CodeGen/Makefile
index a2ad0fd..e7d13f2 100644
--- a/lib/CodeGen/Makefile
+++ b/lib/CodeGen/Makefile
@@ -8,8 +8,15 @@
##===----------------------------------------------------------------------===##
LEVEL = ../..
+include $(LEVEL)/Makefile.config
LIBRARYNAME = LLVMCodeGen
PARALLEL_DIRS = SelectionDAG
BUILD_ARCHIVE = 1
+# Xcode prior to 2.4 generates an error in -pedantic mode with use of HUGE_VAL
+# in this directory. Disable -pedantic for this broken compiler.
+ifneq ($(HUGE_VAL_SANITY),yes)
+CompileCommonOpts := $(filter-out -pedantic, $(CompileCommonOpts))
+endif
+
include $(LEVEL)/Makefile.common