Added options -cflag, -cxxflags, and -ldflags to override the default C
authorEvan Cheng <evan.cheng@apple.com>
Wed, 8 Feb 2006 09:08:06 +0000 (09:08 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 8 Feb 2006 09:08:06 +0000 (09:08 +0000)
compilation, C++ compilation, and linker options.
e.g. This is the options I use for testing on my x86 iMac:
nice ./NightlyTest.pl -release -cflags "-Os -DNDEBUG -fomit-frame-pointer" -cxxflags "-Os -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer"

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

utils/NightlyTest.pl

index fd022456e084c7ebd637554dbd828769f74183b5..c8fb302865a9af2610e01591622f36d2971ba351 100755 (executable)
 #  -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.
 #
 #  ---------------- Options to configure llvm-test ----------------------------
 #  -spec2000path    Path to the benchspec directory in the SPEC 2000 distro
@@ -299,6 +305,15 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
   if (/^-target/)          {
     $CONFIGUREARGS .= " --target=$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 (/^-ldflags/)         {
+    $MAKEOPTS = "$MAKEOPTS LD.Flags=\'$ARGV[0]\'"; shift; next;
+  }
   if (/^-noexternals$/)    { $NOEXTERNALS = 1; next; }
   if (/^-nodejagnu$/)      { $NODEJAGNU = 1; next; }
   if (/^-spec2000path$/)   {