summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-07-26 17:10:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-07-26 17:10:54 +0000
commitdd3f6aa91ffb58535ac3948fe84cf7a9dc8fc384 (patch)
treebc049a0cd632883c697663165ad626aa630b35c3 /tools/llvm-config
parent44b60ec45522934b1d9d22ca7fa9d6966776b65e (diff)
downloadllvm-dd3f6aa91ffb58535ac3948fe84cf7a9dc8fc384.tar.gz
llvm-dd3f6aa91ffb58535ac3948fe84cf7a9dc8fc384.tar.bz2
llvm-dd3f6aa91ffb58535ac3948fe84cf7a9dc8fc384.tar.xz
Make changes necessary for stopping the build if a cyclic library
dependency is found. The find-cycles.pl script now exits with a return code that equals the number of cycles found. The Makefile was changed to ignore the status code of find-cycles.pl. This should be removed once the libraries are free of cyclic dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/Makefile2
-rwxr-xr-xtools/llvm-config/find-cycles.pl4
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
index 16d8ba739f..2f8998eb8b 100644
--- a/tools/llvm-config/Makefile
+++ b/tools/llvm-config/Makefile
@@ -39,7 +39,7 @@ $(LibDeps): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o)
# 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) > $@
# Rerun our configure substitutions as needed.
ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in
diff --git a/tools/llvm-config/find-cycles.pl b/tools/llvm-config/find-cycles.pl
index a280887217..eec79c95c9 100755
--- a/tools/llvm-config/find-cycles.pl
+++ b/tools/llvm-config/find-cycles.pl
@@ -40,6 +40,7 @@ find_all_cycles();
# Print out the finished cycles, with their dependencies.
my @output;
+my $cycles_found = 0;
foreach my $cycle (@CYCLES) {
my @modules = sort keys %{$cycle};
@@ -57,6 +58,7 @@ foreach my $cycle (@CYCLES) {
# Warn about possible linker problems.
my @archives = grep(/\.a$/, @modules);
if (@archives > 1) {
+ $cycles_found = $cycles_found + 1;
print STDERR "find-cycles.pl: Circular dependency between *.a files:\n";
print STDERR "find-cycles.pl: ", join(' ', @archives), "\n";
print STDERR "find-cycles.pl: Some linkers may have problems.\n";
@@ -68,7 +70,7 @@ foreach my $cycle (@CYCLES) {
join(' ', sort keys %dependencies) . "\n");
}
print sort @output;
-
+exit $cycles_found;
#==========================================================================
# Depedency Cycle Support