aboutsummaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-01 16:11:17 +0000
committerChris Lattner <sabre@nondot.org>2010-09-01 16:11:17 +0000
commitf636aa9c7e73c426bf5ddaec1c874e00fd4d2bf7 (patch)
tree571f62597a7d2c1aa0c89a86563ab7bc49e54e5f /Makefile.rules
parent0b5b18340b9c57e8c97172b3190bb97371b72e08 (diff)
have the makefiles check the llvm-config error code instead of charging
on an producing weird link errors. Patch by Yuri Gribov! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules
index b8375f2675..59fa834b4c 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -917,9 +917,20 @@ endif
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