From 6d79ed191518d0301cf0dcd98a1892526e11d1c1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 20 Feb 2014 18:07:33 -0800 Subject: [PATCH] mk: Fix --llvm-root finding tools LLVM's tools are not contained in the local directory if --llvm-root is used by the ./configure script. This fixes the installation path to be the root provided by --llvm-root. --- mk/main.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mk/main.mk b/mk/main.mk index 2c7c7c7cecd..af434ee32df 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -218,8 +218,12 @@ LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract define DEF_LLVM_VARS # The configure script defines these variables with the target triples # separated by Z. This defines new ones with the expected format. +ifeq ($$(CFG_LLVM_ROOT),) CFG_LLVM_BUILD_DIR_$(1):=$$(CFG_LLVM_BUILD_DIR_$(subst -,_,$(1))) CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_INST_DIR_$(subst -,_,$(1))) +else +CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT) +endif # Any rules that depend on LLVM should depend on LLVM_CONFIG LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-config$$(X_$(1))