diff --git a/llvm/Makefile b/llvm/Makefile index 590fab1222c6..ec24862ad6fc 100644 --- a/llvm/Makefile +++ b/llvm/Makefile @@ -102,11 +102,6 @@ endif ifeq ($(LLVM_CROSS_COMPILING),1) all:: cross-compile-build-tools -install:: $(DESTDIR)$(PROJ_bindir) - $(Echo) Installing llvm-config-host - $(Verb) $(ProgInstall) $(BuildLLVMToolDir)/llvm-config \ - $(DESTDIR)$(PROJ_bindir)/llvm-config-host - clean:: $(Verb) rm -rf BuildTools diff --git a/llvm/tools/llvm-config/Makefile b/llvm/tools/llvm-config/Makefile index 3f11730a37d7..e8c86929e188 100644 --- a/llvm/tools/llvm-config/Makefile +++ b/llvm/tools/llvm-config/Makefile @@ -57,3 +57,11 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir >> temp.sed $(Verb) $(SED) -f temp.sed < $< > $@ $(Verb) $(RM) temp.sed + +# When cross-compiling, install a version of llvm-config that runs on the host. +ifeq ($(LLVM_CROSS_COMPILING),1) +install:: $(DESTDIR)$(PROJ_bindir) + $(Echo) Installing llvm-config-host + $(Verb) $(ProgInstall) $(BuildLLVMToolDir)/llvm-config \ + $(DESTDIR)$(PROJ_bindir)/llvm-config-host +endif