diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-02-14 21:54:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-02-14 21:54:08 +0000 |
commit | 9a8398e7a6063d3bf94e11b7cd80458cb8004ab2 (patch) | |
tree | c8b0484851c0775d34013e59692fe350856cf706 /Makefile.rules | |
parent | 0798056b286051fd0f9e8704179ebb4f577cadd5 (diff) |
For 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules index 724554272a9..f0e76218bb3 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -339,7 +339,7 @@ endif 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 @@ endif #--------------------------------------------------------- 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 @@ uninstall-local:: -$(Verb) $(RM) -f $(DestModule) endif +endif # if we're building a library ... ifdef LIBRARYNAME @@ -651,6 +655,9 @@ endif # 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 @@ uninstall-local:: -$(Verb) $(RM) -f $(DestBytecodeLib) endif +endif #--------------------------------------------------------- # ReLinked Library Targets: @@ -881,7 +889,7 @@ endif $(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) |