If a cycle exists, don't succeed building the second time around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30076 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
index 5856196..fe4993d 100644
--- a/tools/llvm-config/Makefile
+++ b/tools/llvm-config/Makefile
@@ -39,7 +39,7 @@
# don't have to process them at runtime.
$(FinalLibDeps): find-cycles.pl $(LibDeps)
$(Echo) "Finding cyclic dependencies between LLVM libraries."
- $(Verb) $(PERL) $< < $(LibDeps) > $@
+ $(Verb) $(PERL) $< < $(LibDeps) > $@ || rm -f $@
# Rerun our configure substitutions as needed.
ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in