From 27665c1331c865f5a7dee3f4e4f3b54cb85d5c82 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 18 Aug 2006 17:22:07 +0000 Subject: [PATCH] To avoid errors where a non-exception .o is on the stack between a throw and a handler, which would produce errors like: terminate called after throwing an instance of 'std::string' we must comment out setting -fno-exceptions until PR797 is completely fixed. Once libraries like lib/System and lib/Support are exception free, we can turn it back on. llvm-svn: 29768 --- llvm/Makefile.rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index 055baa08dc55..42c367a94993 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -206,6 +206,11 @@ else OPTIMIZE_OPTION := -O2 endif +# IF REQUIRES_EH=1 is specified then don't disable exceptions +#ifndef REQUIRES_EH +# CXX.Flags += -fno-exceptions +#endif + ifdef ENABLE_PROFILING BuildMode := Profile CXX.Flags := $(OPTIMIZE_OPTION) -pg -g @@ -249,11 +254,6 @@ else C.Flags += -D_DEBUG endif -# IF REQUIRES_EH=1 is specified then don't disable exceptions -ifndef REQUIRES_EH - CXX.Flags += -fno-exceptions -endif - CXX.Flags += $(CXXFLAGS) C.Flags += $(CFLAGS) CPP.BaseFlags += $(CPPFLAGS)