linktrace-to-depfile: Support alternative linker trace formatting (for openbsd)

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-10-02 20:54:30 +01:00
parent 2d58372ec2
commit 952d2a524c
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 3 additions and 2 deletions

View File

@ -7,8 +7,9 @@ my %deps;
while (my $line = <>) {
chomp $line;
if ($line =~ /\(([^)]+)/) {
$deps{abs_path($1)} = 1;
$line =~ s/[()]/ /g;
for my $word (split(/\s+/, $line)) {
$deps{abs_path($word)} = 1 if ($word =~ /\.a$/);
}
}