Add support for building with _GLIBCXX_DEBUG.  New configure option
--enable-expensive-checks allows the developer to enable runtime
checking that can greatly increase compile time.  Currently it only
turns on _GLIBCXX_DEBUG.  Other expensive debugging checks added later
should be controlled by this configure option.

This patch also updates llvm-config with a --cppflags option to inform
llvm-gcc how to build itself so that it is compatible with an llvm that
was built with _GLIBCXX_DEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37777 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.config.in b/Makefile.config.in
index 03e625b..add8153 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -209,6 +209,11 @@
 #DISABLE_ASSERTIONS = 1
 @DISABLE_ASSERTIONS@
 
+# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM
+# code will include expensive checks, otherwise they are excluded.
+#ENABLE_EXPENSIVE_CHECKS = 0
+@ENABLE_EXPENSIVE_CHECKS@
+
 # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
 # symbols.
 #DEBUG_RUNTIME = 1