[zorg] r188747 - [llvmlab] Add code to find clang/clang++ binaries in compiler artifacts.
Michael Gottesman
mgottesman at apple.com
Mon Aug 19 22:43:38 PDT 2013
Author: mgottesman
Date: Tue Aug 20 00:43:38 2013
New Revision: 188747
URL: http://llvm.org/viewvc/llvm-project?rev=188747&view=rev
Log:
[llvmlab] Add code to find clang/clang++ binaries in compiler artifacts.
This allows for the creation of generic builders that can use compiler artifacts with different layouts.
Modified:
zorg/trunk/zorg/buildbot/Artifacts.py
Modified: zorg/trunk/zorg/buildbot/Artifacts.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/Artifacts.py?rev=188747&r1=188746&r2=188747&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/Artifacts.py (original)
+++ zorg/trunk/zorg/buildbot/Artifacts.py Tue Aug 20 00:43:38 2013
@@ -202,3 +202,36 @@ def GetCompilerArtifacts(f):
haltOnFailure=True, description=['extract', 'host-compiler'],
workdir='host-compiler'))
return f
+
+def GetCCFromCompilerArtifacts(f, base_dir):
+ def get_cc(status, stdin, stdout):
+ lines = filter(bool, stdin.split('\n'))
+ for line in lines:
+ if 'bin/clang' in line:
+ cc_path = line
+ return { 'cc_path' : cc_path }
+ return { }
+
+ f.addStep(buildbot.steps.shell.SetProperty(
+ name='find.cc',
+ command=['find', base_dir, '-name', 'clang'],
+ extract_fn=get_cc,
+ workdir=WithProperties('%(builddir)s')))
+ return f
+
+def GetCXXFromCompilerArtifacts(f, base_dir):
+ def get_cxx(status, stdin, stdout):
+ lines = filter(bool, stdin.split('\n'))
+ for line in lines:
+ if 'bin/clang++' in line:
+ cxx_path = line
+ return { 'cxx_path' : cxx_path }
+ return { }
+
+ f.addStep(buildbot.steps.shell.SetProperty(
+ name='find.cxx',
+ command=['find', base_dir, '-name', 'clang++'],
+ extract_fn=get_cxx,
+ workdir=WithProperties('%(builddir)s')))
+ return f
+
More information about the llvm-commits
mailing list