[zorg] r176585 - Added LTO phased builder.
Michael Gottesman
mgottesman at apple.com
Wed Mar 6 14:27:39 PST 2013
Author: mgottesman
Date: Wed Mar 6 16:27:38 2013
New Revision: 176585
URL: http://llvm.org/viewvc/llvm-project?rev=176585&view=rev
Log:
Added LTO phased builder.
Modified:
zorg/trunk/buildbot/llvmlab/master/config/builderconstruction.py
zorg/trunk/buildbot/llvmlab/master/config/phase_config.py
zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
Modified: zorg/trunk/buildbot/llvmlab/master/config/builderconstruction.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/builderconstruction.py?rev=176585&r1=176584&r2=176585&view=diff
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/builderconstruction.py (original)
+++ zorg/trunk/buildbot/llvmlab/master/config/builderconstruction.py Wed Mar 6 16:27:38 2013
@@ -28,6 +28,8 @@ def construct(name):
# their type delimited by '_'.
if name.startswith('clang-') or name.startswith('llvm-gcc-'):
kind,subname = 'compile',name
+ if 'lto' in name:
+ kind += '-lto'
elif name.startswith('apple-clang'):
kind,subname = 'buildit',name
else:
@@ -63,7 +65,7 @@ def construct(name):
return builder
-def construct_compiler_builder_from_name(name):
+def construct_compiler_builder_from_name(name, use_lto=False):
# Compiler builds are named following:
# <compiler>-<host arch>-<host os>-[<build cc>-]<build style>.
# if <build cc> is unspecified, then the most recent validated build
@@ -123,7 +125,7 @@ def construct_compiler_builder_from_name
config_options.extend(['--enable-optimized'])
config_options.extend(['--disable-assertions'])
else:
- raise ValueError, "invalid build style: %r" % build_style
+ raise ValueError, "invalid build style: %r" % build_style
# Passing is_bootstrap==False will specify the stage 1 compiler as the
# latest validated apple-clang style compiler.
@@ -131,7 +133,8 @@ def construct_compiler_builder_from_name
# build_cc must be set for a bootstrapped compiler
if compiler == 'clang':
return { 'factory' : phasedClang(config_options,
- is_bootstrap = (build_cc is None)) }
+ is_bootstrap = (build_cc is None),
+ use_lto=use_lto) }
elif compiler == 'llvm-gcc':
# Currently, llvm-gcc builders do their own two-stage build,
# they don't use any prebuilt artifacts.
@@ -223,8 +226,12 @@ def construct_lldb_builder_from_name(nam
lldb_triple = '-'.join([host_arch,host_os])
return { 'factory': getLLDBxcodebuildFactory()}
+def construct_lto_compiler_builder_from_name(name):
+ return construct_compiler_builder_from_name(name, use_lto=True)
+
builder_kinds = {
'compile' : construct_compiler_builder_from_name,
+ 'compile-lto' : construct_lto_compiler_builder_from_name,
'lnt' : construct_lnt_builder_from_name,
'lldb' : construct_lldb_builder_from_name}
Modified: zorg/trunk/buildbot/llvmlab/master/config/phase_config.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/phase_config.py?rev=176585&r1=176584&r2=176585&view=diff
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/phase_config.py (original)
+++ zorg/trunk/buildbot/llvmlab/master/config/phase_config.py Wed Mar 6 16:27:38 2013
@@ -81,6 +81,9 @@ phase3_builders.append(build('clang-i386
# Add a release (no asserts) build.
phase3_builders.append(build('clang-x86_64-darwin11-R', phase3_slaves))
+# Add an lto release build.
+phase3_builders.append(build('clang-x86_64-darwin11-Rlto', phase3_slaves))
+
# Add a reasonable matrix of nightlies on the final reference compiler.
# for arch in ('i386', 'x86_64'):
# for flags in (['-O0','-g'],
Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=176585&r1=176584&r2=176585&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Wed Mar 6 16:27:38 2013
@@ -712,6 +712,12 @@ def phasedClang(config_options, is_boots
'--enable-keep-symbols'])
configure_args.append(
WithProperties('--prefix=%(builddir)s/clang-install'))
+
+ # If we need to use lto, add in proper flags here.
+ if use_lto:
+ configure_args.append(
+ '--with-extra-options="-flto -gline-tables-only"')
+
# If we are using a previously built compiler, download it and override CC
# and CXX.
if is_bootstrap:
More information about the llvm-commits
mailing list