X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=Makefile.rules;h=bb1ea75deff504a4327e086d4aace393f01027ba;hp=de97781fcc47e1f38dd635f67480891b915c550c;hb=5544e64765c33afe15b9f427c355f6876ee4299f;hpb=0522d8b12413f2799dfe5c88e95f69141265b087 diff --git a/Makefile.rules b/Makefile.rules index de97781fcc4..bb1ea75deff 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -23,7 +23,7 @@ RecursiveTargets := all clean clean-all install uninstall install-bytecode LocalTargets := all-local clean-local clean-all-local check-local \ install-local printvars uninstall-local \ install-bytecode-local -TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \ +TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \ dist-zip UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) InternalTargets := preconditions distdir dist-hook @@ -38,7 +38,7 @@ InternalTargets := preconditions distdir dist-hook VPATH=$(PROJ_SRC_DIR) #-------------------------------------------------------------------- -# Reset the list of suffixes we know how to build +# Reset the list of suffixes we know how to build. #-------------------------------------------------------------------- .SUFFIXES: .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll @@ -199,6 +199,7 @@ install-bytecode:: install-bytecode-local # Variables derived from configuration we are building #-------------------------------------------------------------------- +CPP.Defines := # OPTIMIZE_OPTION - The optimization level option we want to build LLVM with # this can be overridden on the make command line. ifneq ($(OS),MingW) @@ -212,6 +213,7 @@ ifdef ENABLE_PROFILING CXX.Flags := $(OPTIMIZE_OPTION) -pg -g C.Flags := $(OPTIMIZE_OPTION) -pg -g LD.Flags := $(OPTIMIZE_OPTION) -pg -g + KEEP_SYMBOLS := 1 else ifeq ($(ENABLE_OPTIMIZED),1) BuildMode := Release @@ -244,15 +246,26 @@ ifndef REQUIRES_EH CXX.Flags += -fno-exceptions endif +# IF REQUIRES_RTTI=1 is specified then don't disable run-time type id +ifndef REQUIRES_RTTI +# CXX.Flags += -fno-rtti +endif + # If DISABLE_ASSERTIONS=1 is specified (make command line or configured), # then disable assertions by defining the appropriate preprocessor symbols. ifdef DISABLE_ASSERTIONS BuildMode := $(BuildMode)-Asserts - CXX.Flags += -DNDEBUG - C.Flags += -DNDEBUG + CPP.Defines += -DNDEBUG else - CXX.Flags += -D_DEBUG - C.Flags += -D_DEBUG + CPP.Defines += -D_DEBUG +endif + +# If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or +# configured), then enable expensive checks by defining the +# appropriate preprocessor symbols. +ifdef ENABLE_EXPENSIVE_CHECKS + BuildMode := $(BuildMode)+Checks + CPP.Defines += -D_GLIBCXX_DEBUG endif ifeq ($(ENABLE_PIC),1) @@ -262,7 +275,8 @@ endif CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual C.Flags += $(CFLAGS) -CPP.BaseFlags += $(CPPFLAGS) +CPP.Defines += $(CPPFLAGS) +CPP.BaseFlags += $(CPP.Defines) LD.Flags += $(LDFLAGS) AR.Flags := cru LibTool.Flags := --tag=CXX @@ -1354,15 +1368,12 @@ all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs) %.h: %.y # Rule for building the bison based parsers... -$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y ifneq ($(BISON),) +$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y $(Echo) "Bisoning $*.y" $(Verb) $(BISON) -v -d -p $(