Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
[oota-llvm.git] / tools / llvm-config / find-cycles.pl
index 5f62034bb2a1f343cb39328519a0c1898ef0c92f..5cbf5b4b277609404ac224b3f29ac0ea130df951 100755 (executable)
@@ -29,7 +29,7 @@ sub find_all_cycles;
 # Read our dependency information.
 while (<>) {
     chomp;
-    my ($module, $dependency_str) = /^([^:]*): ?(.*)$/;
+    my ($module, $dependency_str) = /^\s*([^:]+):\s*(.*)\s*$/;
     die "Malformed data: $_" unless defined $dependency_str;
     my @dependencies = split(/ /, $dependency_str);
     $DEPS{$module} = \@dependencies;
@@ -61,8 +61,12 @@ foreach my $cycle (@CYCLES) {
         $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";
         push @modules, @archives; # WORKAROUND: Duplicate *.a files. Ick.
+    } elsif (@modules > 1) {
+        $cycles_found = $cycles_found + 1;
+        print STDERR "find-cycles.pl: Circular dependency between *.o files:\n";
+        print STDERR "find-cycles.pl:   ", join(' ', @modules), "\n";
+        push @modules, @modules; # WORKAROUND: Duplicate *.o files. Ick.
     }
 
     # Add to our output.  (@modules is already as sorted as we need it to be.)