[zorg] r262097 - Tweaking the ClangLTOBuilder3Stage.py build factory.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 17:12:04 PST 2016
Author: gkistanova
Date: Fri Feb 26 19:12:04 2016
New Revision: 262097
URL: http://llvm.org/viewvc/llvm-project?rev=262097&view=rev
Log:
Tweaking the ClangLTOBuilder3Stage.py build factory.
Patch by Mike Edwards.
Modified:
zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder3Stage.py
Modified: zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder3Stage.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder3Stage.py?rev=262097&r1=262096&r2=262097&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder3Stage.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangLTOBuilder3Stage.py Fri Feb 26 19:12:04 2016
@@ -46,12 +46,22 @@ def get3StageClangLTOBuildFactory(
)
# We have to programatically determine the current llvm version.
+ def getClangVer(exit_status, stdout, stderr):
+ # We expect something like this:
+ # release = '3.9'
+ if exit_status:
+ return {}
+ k,v = stdout.split('=')
+ llvm_ver = v.strip().strip("\'\"")
+ return { 'clang_ver' : clang_ver }
+
f.addStep(
SetProperty(
- name="get_llvm_ver",
- command=["grep 'release =' %s/tools/clang/docs/conf.py | awk '{print $3;}' | sed \"s/'//g\"" % llvm_srcdir],
- property="llvm_ver",
- description="get llvm release ver",
+ name="get_clang_ver",
+ command=["grep", "release =", "./tools/clang/docs/conf.py"],
+ extract_fn=getClangVer,
+ property="clang_ver",
+ description="get clang release ver",
workdir=llvm_srcdir,
env=merged_env
)
@@ -98,7 +108,7 @@ def get3StageClangLTOBuildFactory(
if build_gold:
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-LLVMgold.so',
targets=['lib/LLVMgold.so'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -108,7 +118,7 @@ def get3StageClangLTOBuildFactory(
)
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-stage3-clang',
targets=['stage3-clang'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -118,7 +128,7 @@ def get3StageClangLTOBuildFactory(
)
f.addStep(
- NinjaCommand(name='build',
+ NinjaCommand(name='build-stage3-check-clang',
targets=['stage3-check-clang'],
haltOnFailure=True,
warnOnWarnings=True,
@@ -131,12 +141,12 @@ def get3StageClangLTOBuildFactory(
shell_command = [
"diff",
"-q",
- "tools/clang/stage2-bins/bin/clang-%(llvm_ver)s",
- "tools/clang/stage2-bins/tools/clang/stage3-bins/bin/clang-%(llvm_ver)s"
+ "tools/clang/stage2-bins/bin/clang-%(clang_ver)s",
+ "tools/clang/stage2-bins/tools/clang/stage3-bins/bin/clang-%(clang_ver)s"
]
f.addStep(
ShellCommand(
- name="compare",
+ name="compare-clang",
description=["comapre stage2 & stage3 clang"],
haltOnFailure=True,
command=WithProperties(" ".join(shell_command)),
More information about the llvm-commits
mailing list