[llvm-commits] [zorg] r86530 - /zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
Daniel Dunbar
daniel at zuster.org
Mon Nov 9 00:07:40 PST 2009
Author: ddunbar
Date: Mon Nov 9 02:07:40 2009
New Revision: 86530
URL: http://llvm.org/viewvc/llvm-project?rev=86530&view=rev
Log:
Parameterize LLVM stage 1 and 2 build configs. Also, switch to Release as the
default for both stage 1 and stage 2. A stage 2 LLVM Release build is *really*
slow if the llvm-gcc was built with a Debug LLVM.
Modified:
zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py?rev=86530&r1=86529&r2=86530&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py Mon Nov 9 02:07:40 2009
@@ -6,9 +6,34 @@
from zorg.buildbot.commands.ClangTestCommand import ClangTestCommand
+def getConfigArgs(origname):
+ name = origname
+ args = []
+ if name.startswith('Release'):
+ name = name[len('Release'):]
+ args.append('--enable-optimized')
+ elif name.startswith('Debug'):
+ name = name[len('Debug'):]
+ else:
+ raise ValueError,'Unknown config name: %r' % origname
+
+ if name.startswith('-Asserts'):
+ name = name[len('-Asserts'):]
+ args.append('--disable-assertions')
+
+ if name.startswith('+Checks'):
+ name = name[len('+Checks'):]
+ args.append('--enable-expensive-checks')
+
+ if name:
+ raise ValueError,'Unknown config name: %r' % origname
+
+ return args
+
def getLLVMGCCBuildFactory(jobs=1, update=True, clean=True,
gxxincludedir=None, triple=None,
- useTwoStage=True):
+ useTwoStage=True, stage1_config='Release',
+ stage2_config='Release'):
f = buildbot.process.factory.BuildFactory()
# Determine the build directory.
@@ -45,13 +70,16 @@
base_llvm_configure_args.append('--build=' + triple)
base_llvm_configure_args.append('--host=' + triple)
base_llvm_configure_args.append('--target=' + triple)
+ stage_configure_args = getConfigArgs(stage1_config)
f.addStep(Configure(name='configure.llvm.stage1',
- command=base_llvm_configure_args +
+ command=base_llvm_configure_args +
+ stage_configure_args +
["--without-llvmgcc",
"--without-llvmgxx"],
description=["configure",
"llvm",
- "(stage 1)"],
+ "(stage 1)",
+ stage1_config],
workdir="llvm.obj"))
# Build llvm (stage 1).
@@ -61,7 +89,7 @@
description=["compile",
"llvm",
"(stage 1)",
- "Debug"],
+ stage1_config],
workdir="llvm.obj"))
# Run LLVM tests (stage 1).
@@ -140,10 +168,11 @@
workdir="."))
# Configure llvm (stage 2).
+ stage_configure_args = getConfigArgs(stage2_config)
f.addStep(Configure(name="configure.llvm.stage2",
command=base_llvm_configure_args +
- ["--enable-optimized",
- WithProperties("--with-llvmgcc=%(builddir)s/llvm-gcc.install/bin/llvm-gcc"),
+ stage_configure_args +
+ [WithProperties("--with-llvmgcc=%(builddir)s/llvm-gcc.install/bin/llvm-gcc"),
WithProperties("--with-llvmgxx=%(builddir)s/llvm-gcc.install/bin/llvm-g++")],
env={'CC' : WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-gcc"),
'CXX' : WithProperties("%(builddir)s/llvm-gcc.install/bin/llvm-g++"),},
@@ -152,7 +181,7 @@
description=["configure",
"llvm",
"(stage 2)",
- "Release"]))
+ stage2_config]))
# Build LLVM (stage 2).
f.addStep(WarningCountingShellCommand(name = "compile.llvm.stage2",
@@ -161,7 +190,7 @@
description=["compile",
"llvm",
"(stage 2)",
- "Release"],
+ stage2_config],
workdir="llvm.obj.2"))
# Run LLVM tests (stage 2).
More information about the llvm-commits
mailing list