mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 15:04:57 +00:00
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. llvm-svn: 29290
This commit is contained in:
parent
62ffefecfa
commit
ed6495426c
@ -39,7 +39,7 @@ $(LibDeps): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o)
|
|||||||
# don't have to process them at runtime.
|
# don't have to process them at runtime.
|
||||||
$(FinalLibDeps): find-cycles.pl $(LibDeps)
|
$(FinalLibDeps): find-cycles.pl $(LibDeps)
|
||||||
$(Echo) "Finding cyclic dependencies between LLVM libraries."
|
$(Echo) "Finding cyclic dependencies between LLVM libraries."
|
||||||
$(Verb) $(PERL) $< < $(LibDeps) > $@
|
-$(Verb) $(PERL) $< < $(LibDeps) > $@
|
||||||
|
|
||||||
# Rerun our configure substitutions as needed.
|
# Rerun our configure substitutions as needed.
|
||||||
ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in
|
ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in
|
||||||
|
@ -40,6 +40,7 @@ find_all_cycles();
|
|||||||
|
|
||||||
# Print out the finished cycles, with their dependencies.
|
# Print out the finished cycles, with their dependencies.
|
||||||
my @output;
|
my @output;
|
||||||
|
my $cycles_found = 0;
|
||||||
foreach my $cycle (@CYCLES) {
|
foreach my $cycle (@CYCLES) {
|
||||||
my @modules = sort keys %{$cycle};
|
my @modules = sort keys %{$cycle};
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ foreach my $cycle (@CYCLES) {
|
|||||||
# Warn about possible linker problems.
|
# Warn about possible linker problems.
|
||||||
my @archives = grep(/\.a$/, @modules);
|
my @archives = grep(/\.a$/, @modules);
|
||||||
if (@archives > 1) {
|
if (@archives > 1) {
|
||||||
|
$cycles_found = $cycles_found + 1;
|
||||||
print STDERR "find-cycles.pl: Circular dependency between *.a files:\n";
|
print STDERR "find-cycles.pl: Circular dependency between *.a files:\n";
|
||||||
print STDERR "find-cycles.pl: ", join(' ', @archives), "\n";
|
print STDERR "find-cycles.pl: ", join(' ', @archives), "\n";
|
||||||
print STDERR "find-cycles.pl: Some linkers may have problems.\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");
|
join(' ', sort keys %dependencies) . "\n");
|
||||||
}
|
}
|
||||||
print sort @output;
|
print sort @output;
|
||||||
|
exit $cycles_found;
|
||||||
|
|
||||||
#==========================================================================
|
#==========================================================================
|
||||||
# Depedency Cycle Support
|
# Depedency Cycle Support
|
||||||
|
Loading…
Reference in New Issue
Block a user