diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index e5719b329ab1..3816bbb1a1cb 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -527,7 +527,11 @@ ifndef LLVM_TBLGEN LLVM_TBLGEN := $(LLVMToolDir)/llvm-tblgen$(EXEEXT) endif endif -LLVM_CONFIG := $(LLVMToolDir)/llvm-config +ifeq ($(LLVM_CROSS_COMPILING),1) + LLVM_CONFIG := $(BuildLLVMToolDir)/llvm-config-2$(BUILD_EXEEXT) +else + LLVM_CONFIG := $(LLVMToolDir)/llvm-config-2$(EXEEXT) +endif ifndef LLVMLD LLVMLD := $(LLVMToolDir)/llvm-ld$(EXEEXT) endif