- system "(time -p $NICE $MAKECMD $MAKEOPTS) >> $BuildLog 2>&1";
-}
-
-##############################################################
-#
-# Get some statistics about the build...
-#
-##############################################################
-#this can de done on server
-#my @Linked = split '\n', `grep Linking $BuildLog`;
-#my $NumExecutables = scalar(grep(/executable/, @Linked));
-#my $NumLibraries = scalar(grep(!/executable/, @Linked));
-#my $NumObjects = `grep ']\: Compiling ' $BuildLog | wc -l` + 0;
-
-# Get the number of lines of source code. Must be here after the build is done
-# because countloc.sh uses the llvm-config script which must be built.
-my $LOC = `utils/countloc.sh`;
-
-# Get the time taken by the configure script
-my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
-my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
-my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
-my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
-
-$ConfigTime=-1 unless $ConfigTime;
-$ConfigWallTime=-1 unless $ConfigWallTime;
-
-my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
-my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
-my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
-my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
-
-$BuildTime=-1 unless $BuildTime;
-$BuildWallTime=-1 unless $BuildWallTime;
-
-my $BuildError = 0, $BuildStatus = "OK";
-if ($NOBUILD) {
- $BuildStatus = "Skipped by user";
- $BuildError = 1;
-}
-elsif (`grep '^$MAKECMD\[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
- `grep '^$MAKECMD: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
- $BuildStatus = "Error: compilation aborted";
- $BuildError = 1;
- if( $VERBOSE) { print "\n***ERROR BUILDING TREE\n\n"; }
-}
-if ($BuildError) { $NODEJAGNU=1; }
-
-my $a_file_sizes="";
-my $o_file_sizes="";
-if (!$BuildError) {
- print "Organizing size of .o and .a files\n"
- if ( $VERBOSE );
- ChangeDir( "$BuildDir/llvm", "Build Directory" );
- $afiles.= `find utils/ -iname '*.a' -ls`;
- $afiles.= `find lib/ -iname '*.a' -ls`;
- $afiles.= `find tools/ -iname '*.a' -ls`;
- if($BUILDTYPE eq "release"){
- $afiles.= `find Release/ -iname '*.a' -ls`;
- } else {
- $afiles.= `find Debug/ -iname '*.a' -ls`;
- }
-
- $ofiles.= `find utils/ -iname '*.o' -ls`;
- $ofiles.= `find lib/ -iname '*.o' -ls`;
- $ofiles.= `find tools/ -iname '*.o' -ls`;
- if($BUILDTYPE eq "release"){
- $ofiles.= `find Release/ -iname '*.o' -ls`;
- } else {
- $ofiles.= `find Debug/ -iname '*.o' -ls`;
- }
-
- @AFILES = split "\n", $afiles;
- $a_file_sizes="";
- foreach $x (@AFILES){
- $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/;
- $a_file_sizes.="$1 $2 $BUILDTYPE\n";
- }
- @OFILES = split "\n", $ofiles;
- $o_file_sizes="";
- foreach $x (@OFILES){
- $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/;
- $o_file_sizes.="$1 $2 $BUILDTYPE\n";