# -norunningtests.
# -norunningtests Do not run the Olden benchmark suite with
# LARGE_PROBLEM_SIZE enabled.
-# -noexternals Do not run the external tests (for cases where povray
-# or SPEC are not installed)
# -nodejagnu Do not run feature or regression tests
# -parallel Run two parallel jobs with GNU Make.
# -release Build an LLVM Release version
-# -pedantic Enable additional GCC warnings to detect possible errors.
# -enable-llcbeta Enable testing of beta features in llc.
# -disable-llc Disable LLC tests in the nightly tester.
# -disable-jit Disable JIT tests in the nightly tester.
+# -disable-cbe Disable C backend tests in the nightly tester.
# -verbose Turn on some debug output
# -debug Print information useful only to maintainers of this script.
# -nice Checkout/Configure/Build with "nice" to reduce impact
# -cvstag Check out a specific CVS tag to build LLVM (useful for
# testing release branches)
# -target Specify the target triplet
+# -cflags Next argument specifies that C compilation options that
+# override the default.
+# -cxxflags Next argument specifies that C++ compilation options that
+# override the default.
+# -ldflags Next argument specifies that linker options that override
+# the default.
+# -compileflags Next argument specifies extra options passed to make when
+# building LLVM.
#
# ---------------- Options to configure llvm-test ----------------------------
-# -spec2000path Path to the benchspec directory in the SPEC 2000 distro
-# -spec95path Path to the benchspec directory in the SPEC 95 distro.
-# -povraypath Path to the povray sources
-# -namdpath Path to the namd sources
+# -extraflags Next argument specifies extra options that are passed to
+# compile the tests.
+# -noexternals Do not run the external tests (for cases where povray
+# or SPEC are not installed)
+# -with-externals Specify a directory where the external tests are located.
#
# CVSROOT is the CVS repository from which the tree will be checked out,
# specified either in the full :method:user@host:/dir syntax, or
my $NICE = "";
my $NODEJAGNU = 0;
-my $LLVMTESTCONFIGARGS = "";
-
sub ReadFile {
if (open (FILE, $_[0])) {
undef $/;
sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
$_ = shift;
- if (length) { return "<ul><pre>$_</pre></ul>"; } else { "<b>none</b><br>"; }
+ if (length) { return "<pre>$_</pre>"; } else { "<b>none</b><br>"; }
+}
+
+sub ArrayToList { # Add <li> tags around nonempty list or convert to "none"
+ my $result = "";
+ if (scalar @_) {
+ $result = "<ul>";
+ foreach $item (@_) {
+ $result .= "<li><tt>$item</tt></li>";
+ }
+ $result .= "</ul>";
+ } else {
+ $result = "<p><b>none</b></p>";
+ }
+ return $result;
}
sub ChangeDir { # directory, logical name
if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; }
if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1"; next; }
- if (/^-pedantic$/) {
- $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -ffor-scope'";
- next;
- }
if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; }
if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1";
$CONFIGUREARGS .= " --disable-llc_diffs"; next; }
if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1";
$CONFIGUREARGS .= " --disable-jit"; next; }
+ if (/^-disable-cbe$/) { $PROGTESTOPTS .= " DISABLE_CBE=1"; next; }
if (/^-verbose$/) { $VERBOSE = 1; next; }
if (/^-debug$/) { $DEBUG = 1; next; }
if (/^-nice$/) { $NICE = "nice "; next; }
if (/^-f2c$/) {
$CONFIGUREARGS .= " --with-f2c=$ARGV[0]"; shift; next;
}
+ if (/^-with-externals/) {
+ $CONFIGUREARGS .= " --with-externals=$ARGV[0]"; shift; next
+ }
if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; }
if (/^-templatefile$/) { $Template = $ARGV[0]; shift; next; }
if (/^-gccpath/) {
if (/^-target/) {
$CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next;
}
- if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
- if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
- if (/^-spec2000path$/) {
- $LLVMTESTCONFIGARGS .= " --enable-spec2000=$ARGV[0]"; shift; next;
+ if (/^-cflags/) {
+ $MAKEOPTS = "$MAKEOPTS C.Flags=\'$ARGV[0]\'"; shift; next;
+ }
+ if (/^-cxxflags/) {
+ $MAKEOPTS = "$MAKEOPTS CXX.Flags=\'$ARGV[0]\'"; shift; next;
}
- if (/^-spec95path$/) {
- $LLVMTESTCONFIGARGS .= " --enable-spec95=$ARGV[0]"; shift; next;
+ if (/^-ldflags/) {
+ $MAKEOPTS = "$MAKEOPTS LD.Flags=\'$ARGV[0]\'"; shift; next;
}
- if (/^-povraypath$/) {
- $LLVMTESTCONFIGARGS .= " --enable-povray=$ARGV[0]"; shift; next;
+ if (/^-compileflags/) {
+ $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next;
}
- if (/^-namdpath$/) {
- $LLVMTESTCONFIGARGS .= " --enable-namd=$ARGV[0]"; shift; next;
+ if (/^-extraflags/) {
+ $CONFIGUREARGS .= " --with-extra-options=\'$ARGV[0]\'"; shift; next;
}
+ if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
+ if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
print "Unknown option: $_ : ignoring!\n";
}
#
if (!$NOCHECKOUT) {
if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; }
- my $EXTRAFLAGS = "--enable-spec --with-objroot=.$LLVMTESTCONFIGARGS";
+ my $EXTRAFLAGS = "--enable-spec --with-objroot=.";
system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1";
if ( $VERBOSE ) { print "BUILD STAGE\n"; }
}
}
my $WarningsFile = join "\n", @Warnings;
-my $WarningsList = AddPreTag $WarningsFile;
+my $WarningsList = ArrayToList @Warnings;
$WarningsFile =~ s/:[0-9]+:/::/g;
# Emit the warnings file, so we can diff...
print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
-$WarningsAdded = AddPreTag $WarningsAdded;
-$WarningsRemoved = AddPreTag $WarningsRemoved;
+my @TmpWarningsAdded = split "\n", $WarningsAdded;
+my @TmpWarningsRemoved = split "\n", $WarningsRemoved;
+$WarningsAdded = ArrayToList @TmpWarningsAdded;
+$WarningsRemoved = ArrayToList @TmpWarningsRemoved;
#
# Get some statistics about CVS commits over the current day...