Do not install llvm-config-host for cross-builds of clang. rdar://11317847
[oota-llvm.git] / tools / llvm-config / Makefile
index 3f11730a37d7ed8a74d5e02602ec5230a2061919..e8c86929e1880946a572c38cfc883b979af12955 100644 (file)
@@ -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