X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=3f17428a424befb116ed17ecb9b90da4fae55fd0;hb=6baf992d954332df75b8374876455734415dadac;hp=3169e0bd63ea7f61fe977fb4d866b6bc844a0ae2;hpb=2bc152e30827151c3518206220b516dd4a38a85f;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index 3169e0b..3f17428 100755 --- a/bin/blhc +++ b/bin/blhc @@ -641,8 +641,7 @@ foreach my $file (@ARGV) { # only, doesn't use the dpkg-buildpackage header. Necessary to ignore # build logs which aren't built (wrong architecture, build error, # etc.). - if (not $arch - and $line =~ /^Architecture: (.+)$/) { + if (not $arch and $line =~ /^Architecture: (.+)$/) { $arch = $1; } @@ -703,6 +702,10 @@ foreach my $file (@ARGV) { # Input lines, contain only the lines with compiler commands. my @input = (); + # Non-verbose lines in the input. Used to reduce calls to + # is_non_verbose_build() (which is quite slow) in the second loop when + # it's already clear if a line is non-verbose or not. + my @input_nonverbose = (); my $continuation = 0; my $complete_line = undef; @@ -788,7 +791,7 @@ foreach my $file (@ARGV) { and $line =~ /^(?:checking|[Cc]onfigure:) /; next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)? [Cc]ompiler[\s.]*:?\s+ - /xo; + /x; next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o; # `moc-qt4`, contains '-I/usr/share/qt4/mkspecs/linux-g++' (or # similar for other architectures) which gets recognized as a @@ -813,6 +816,7 @@ foreach my $file (@ARGV) { $harden_bindnow = 1 if any_flags_used($line, @def_ldflags_bindnow); push @input, $line; + push @input_nonverbose, $non_verbose; } } @@ -926,7 +930,8 @@ LINE: } my $skip = 0; - if (is_non_verbose_build($line, $input[$i + 1], \$skip)) { + if ($input_nonverbose[$i] + and is_non_verbose_build($line, $input[$i + 1], \$skip)) { if (not $option_buildd) { error_non_verbose_build($line); $exit |= $exit_code{non_verbose_build};