[llvm-commits] CVS: llvm/Makefile.rules

Reid Spencer reid at x10sys.com
Mon Feb 14 13:54:19 PST 2005



Changes in directory llvm:

Makefile.rules updated: 1.296 -> 1.297
---
Log message:

For PR496: http://llvm.cs.uiuc.edu/PR496 :
When llvm-gcc is not available, bypass rules for Modules and Bytecode 
Libraries that require llvm-gcc and emit instead a warning that llvm-gcc
is not available. This permits "make LLVMGCC=" to build LLVM completely
without error and provides warnings about the modules and bc libs that
could not be constructed.


---
Diffs of the changes:  (+10 -2)

 Makefile.rules |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.296 llvm/Makefile.rules:1.297
--- llvm/Makefile.rules:1.296	Sat Feb 12 21:41:10 2005
+++ llvm/Makefile.rules	Mon Feb 14 15:54:08 2005
@@ -339,7 +339,7 @@
 
 CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused
 
-LD.Flags  += -L$(LibDir) -L$(LLVMLibDir) $(LIBS)
+LD.Flags  += -L$(LibDir) -L$(LLVMLibDir) 
 CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
 	     -I$(PROJ_OBJ_ROOT)/include \
 	     -I$(PROJ_SRC_ROOT)/include \
@@ -555,6 +555,9 @@
 #---------------------------------------------------------
 
 ifdef MODULE_NAME
+ifeq ($(strip $(LLVMGCC)),)
+$(warning Modules require llvm-gcc but no llvm-gcc is available)
+else
 
 Module     := $(LibDir)/$(MODULE_NAME).bc
 LinkModule := $(LLVMGCCWITHPATH) -shared -nostdlib
@@ -594,6 +597,7 @@
 	-$(Verb) $(RM) -f $(DestModule)
 
 endif
+endif
 
 # if we're building a library ...
 ifdef LIBRARYNAME
@@ -651,6 +655,9 @@
 #   targets for building them.
 #---------------------------------------------------------
 ifdef BYTECODE_LIBRARY
+ifeq ($(strip $(LLVMGCC)),)
+$(warning Bytecode libraries require llvm-gcc which could not be found)
+else
 
 # make the C and C++ compilers strip debug info out of bytecode libraries.
 BCCompile.C += -Wa,-strip-debug
@@ -704,6 +711,7 @@
 	-$(Verb) $(RM) -f $(DestBytecodeLib)
 
 endif
+endif
 
 #---------------------------------------------------------
 # ReLinked Library Targets:
@@ -881,7 +889,7 @@
 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
 	$(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
 	$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
-          $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB)
+          $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
 	$(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) $(StripWarnMsg) 
 
 DestTool = $(PROJ_bindir)/$(TOOLNAME)






More information about the llvm-commits mailing list