From 2d7adb5f5af463f293b7a9ba4ddea937a29b03c9 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 6 Nov 2009 04:11:29 +0000 Subject: NewNightlyTest: Add -llvmgccdir as alternative to environment variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86226 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/NewNightlyTest.pl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'utils') diff --git a/utils/NewNightlyTest.pl b/utils/NewNightlyTest.pl index ed22b77f99..acda7064e7 100755 --- a/utils/NewNightlyTest.pl +++ b/utils/NewNightlyTest.pl @@ -53,6 +53,7 @@ use Socket; # building LLVM. # -use-gmake Use gmake instead of the default make command to build # llvm and run tests. +# -llvmgccdir Next argument specifies the llvm-gcc install prefix. # # TESTING OPTIONS: # -notest Do not even attempt to run the test programs. @@ -147,6 +148,14 @@ $SUBMIT = 1; $PARALLELJOBS = "2"; my $TESTFLAGS=""; +if ($ENV{'LLVMGCCDIR'}) { + $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'}; + $LLVMGCCPATH = $ENV{'LLVMGCCDIR'} . '/bin'; +} +else { + $LLVMGCCPATH = ""; +} + while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; last if /^--$/; # Stop processing arguments on -- @@ -211,6 +220,10 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { if (/^-test-cxxflags/) { $TESTFLAGS = "$TESTFLAGS CXXFLAGS=\'$ARGV[0]\'"; shift; next; } if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } + if (/^-llvmgccdir/) { $CONFIGUREARGS .= " --with-llvmgccdir=\'$ARGV[0]\'"; + $LLVMGCCPATH = $ARGV[0] . '/bin'; + shift; next;} + if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } if (/^-use-gmake/) { $MAKECMD = "gmake"; shift; next; } if (/^-extraflags/) { $CONFIGUREARGS .= " --with-extra-options=\'$ARGV[0]\'"; shift; next;} @@ -220,14 +233,6 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { print "Unknown option: $_ : ignoring!\n"; } -if ($ENV{'LLVMGCCDIR'}) { - $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'}; - $LLVMGCCPATH = $ENV{'LLVMGCCDIR'} . '/bin'; -} -else { - $LLVMGCCPATH = ""; -} - if ($CONFIGUREARGS !~ /--disable-jit/) { $CONFIGUREARGS .= " --enable-jit"; } @@ -758,6 +763,8 @@ if ($GCCPATH ne "") { my $gcc_version = (split '\n', $gcc_version_long)[0]; # Get llvm-gcc target triple. +# +# FIXME: This shouldn't be hardwired to llvm-gcc. my $llvmgcc_version_long = ""; if ($LLVMGCCPATH ne "") { $llvmgcc_version_long = `$LLVMGCCPATH/llvm-gcc -v 2>&1`; -- cgit v1.2.3