[llvm-commits] [llvm] r112714 - in /llvm/trunk: Makefile.rules lib/CompilerDriver/Makefile
Chris Lattner
sabre at nondot.org
Wed Sep 1 09:11:17 PDT 2010
Author: lattner
Date: Wed Sep 1 11:11:17 2010
New Revision: 112714
URL: http://llvm.org/viewvc/llvm-project?rev=112714&view=rev
Log:
have the makefiles check the llvm-config error code instead of charging
on an producing weird link errors. Patch by Yuri Gribov!
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/lib/CompilerDriver/Makefile
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=112714&r1=112713&r2=112714&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Wed Sep 1 11:11:17 2010
@@ -917,9 +917,20 @@
LLVMLibsOptions += -lLLVM-$(LLVMVersion)
LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
else
-LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
-LLVMLibsPaths += $(LLVM_CONFIG) \
- $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
+
+ifndef NO_LLVM_CONFIG
+LLVMConfigLibs := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error)
+ifeq ($(LLVMConfigLibs),Error)
+$(error llvm-config --libs failed)
+endif
+LLVMLibsOptions += $(LLVMConfigLibs)
+LLVMConfigLibfiles := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS) || echo Error)
+ifeq ($(LLVMConfigLibfiles),Error)
+$(error llvm-config --libfiles failed)
+endif
+LLVMLibsPaths += $(LLVM_CONFIG) $(LLVMConfigLibfiles)
+endif
+
endif
endif
endif
Modified: llvm/trunk/lib/CompilerDriver/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Makefile?rev=112714&r1=112713&r2=112714&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/Makefile (original)
+++ llvm/trunk/lib/CompilerDriver/Makefile Wed Sep 1 11:11:17 2010
@@ -10,9 +10,11 @@
LEVEL = ../..
# We don't want this library to appear in `llvm-config --libs` output, so its
-# name doesn't start with "LLVM".
+# name doesn't start with "LLVM" and NO_LLVM_CONFIG is set.
LIBRARYNAME = CompilerDriver
LINK_COMPONENTS = support system
+NO_LLVM_CONFIG = 1
+
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list