From 7c9ec5ff37cc127b8ad9919959f029fdad51edb2 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 18 Aug 2006 09:30:03 +0000 Subject: [PATCH] For PR797: 1. Actually turn on -fno-exceptions in libraries that do not have the REQUIRES_EH option in their Makefile. The following library file size savings were made (DEBUG): libLLVMDataStructure.a 525K libLLVMCore.a 380K libLLVMCodeGen.a 350K libLLVMTransformUtils.a 305K libLLVMScalarOpts.a 270K libLLVMAnalysis.a 247K libLLVMSelectionDAG.a 233K libLLVMipo.a 175K LLVMX86.o 123K LLVMPPC.o 81K libLLVMipa.a 17K TOTAL 2,706K Note that the savings is actually a little larger than this because I didn't count any of the libraries that had small changes. 2. Remove REQUIRES_EH from the AsmParser library as it is now exception free. This resulted in a nearly 78K drop in the size of the debug library for AsmParser. llvm-svn: 29767 --- llvm/Makefile.rules | 5 +++++ llvm/lib/AsmParser/Makefile | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index c9795ec6969d..055baa08dc55 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -249,6 +249,11 @@ 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) diff --git a/llvm/lib/AsmParser/Makefile b/llvm/lib/AsmParser/Makefile index 9755571d07ca..75ae34542a8c 100644 --- a/llvm/lib/AsmParser/Makefile +++ b/llvm/lib/AsmParser/Makefile @@ -10,7 +10,6 @@ LEVEL = ../.. LIBRARYNAME := LLVMAsmParser BUILD_ARCHIVE = 1 -REQUIRES_EH := 1 EXTRA_DIST := Lexer.cpp.cvs Lexer.l.cvs \ llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs