Allow script to set configure args.
authorBrian Gaeke <gaeke@uiuc.edu>
Thu, 3 Jun 2004 21:46:56 +0000 (21:46 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Thu, 3 Jun 2004 21:46:56 +0000 (21:46 +0000)
Allow environment to set llvmgccdir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13994 91177308-0d34-0410-b5e6-96231b3b80d8

utils/NightlyTest.pl

index 0ab685e648ced2befd37c1c55598ab83b2b9c172..63311f4f3e52aea56f32817f81aae39efd5162c1 100755 (executable)
@@ -133,8 +133,9 @@ my $MAKEOPTS   = "";
 my $PROGTESTOPTS = "";
 my $VERBOSE  = 0;
 my $DEBUG = 0;
+my $CONFIGUREARGS = "--enable-jit";
 
-# Parse arguments...
+# Parse arguments... 
 while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
   shift;
   last if /^--$/;  # Stop processing arguments on --
@@ -148,13 +149,19 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
   if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
   if (/^-parallel$/)       { $MAKEOPTS   = "-j2 -l3.0"; next; }
   if (/^-enable-linscan$/) { $PROGTESTOPTS .= " ENABLE_LINEARSCAN=1"; next; }
-  if (/^-disable-codegen$/){ $PROGTESTOPTS .= " DISABLE_JIT=1 DISABLE_LLC=1"; next; }
+  if (/^-disable-codegen$/){ $PROGTESTOPTS .= " DISABLE_JIT=1 DISABLE_LLC=1";
+                             $CONFIGUREARGS="--disable-jit --disable-llc_diffs";
+                             next; }
   if (/^-verbose$/)        { $VERBOSE  = 1; next; }
   if (/^-debug$/)          { $DEBUG  = 1; next; }
 
   print "Unknown option: $_ : ignoring!\n";
 }
 
+if ($ENV{'LLVMGCCDIR'}) {
+  $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
+}
+
 die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
 
 if (@ARGV == 3) {
@@ -226,7 +233,7 @@ $LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
 #
 if (!$NOCHECKOUT) {
   if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; }
-  system "(time -p ./configure --enable-jit --enable-spec --with-objroot=.) > $Prefix-Build-Log.txt 2>&1";
+  system "(time -p ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $Prefix-Build-Log.txt 2>&1";
 
   if ( $VERBOSE ) { print "BUILD STAGE\n"; }
   # Build the entire tree, capturing the output into $Prefix-Build-Log.txt