[zorg] r275649 - Remove phasedClang and getClangMinGWBuildFactory from ClangBuilder.py.

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 16:30:05 PDT 2016


Author: gkistanova
Date: Fri Jul 15 18:30:05 2016
New Revision: 275649

URL: http://llvm.org/viewvc/llvm-project?rev=275649&view=rev
Log:
Remove phasedClang and getClangMinGWBuildFactory from ClangBuilder.py.
They are not in use for a long time now.

Modified:
    zorg/trunk/zorg/buildbot/builders/ClangBuilder.py

Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=275649&r1=275648&r2=275649&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Fri Jul 15 18:30:05 2016
@@ -862,91 +862,6 @@ def getClangMSVCBuildFactory(update=True
 
     return f
 
-# Builds on Windows using CMake, MinGW(32|64), and no Microsoft tools.
-def getClangMinGWBuildFactory(update=True, clean=True, jobs=6, cmake=r"cmake"):
-    f = buildbot.process.factory.BuildFactory()
-
-    if update:
-        f.addStep(SVN(name='svn-llvm',
-                      mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/',
-                      defaultBranch='trunk',
-                      workdir='llvm'))
-        f.addStep(SVN(name='svn-clang',
-                      mode='update', baseURL='http://llvm.org/svn/llvm-project/cfe/',
-                      defaultBranch='trunk',
-                      workdir='llvm/tools/clang'))
-        f.addStep(SVN(name='svn-clang-tools-extra',
-                      mode='update', baseURL='http://llvm.org/svn/llvm-project/clang-tools-extra/',
-                      defaultBranch='trunk',
-                      workdir='llvm/tools/clang/tools/extra'))
-
-    # Full & fast clean.
-    if clean:
-        # note: This command is redundant as the next command removes everything
-        f.addStep(ShellCommand(name='clean-1',
-                               command=['del','/s/q','build'],
-                               warnOnFailure=True,
-                               description='cleaning',
-                               descriptionDone='clean',
-                               workdir='llvm'))
-        f.addStep(ShellCommand(name='clean-2',
-                               command=['rmdir','/s/q','build'],
-                               warnOnFailure=True,
-                               description='cleaning',
-                               descriptionDone='clean',
-                               workdir='llvm'))
-
-    # Create the Makefiles.
-
-    # Use batch files instead of ShellCommand directly, Windows quoting is
-    # borked. FIXME: See buildbot ticket #595 and buildbot ticket #377.
-    f.addStep(batch_file_download.BatchFileDownload(name='cmakegen',
-                                command=[cmake,
-                                         "-DLLVM_TARGETS_TO_BUILD:=X86",
-                                         "-DLLVM_INCLUDE_EXAMPLES:=OFF",
-                                         "-DLLVM_INCLUDE_TESTS:=OFF",
-                                         "-DLLVM_TARGETS_TO_BUILD:=X86",
-                                         "-G",
-                                         "Ninja",
-                                         ".."],
-                                workdir="llvm\\build"))
-    f.addStep(ShellCommand(name='cmake',
-                           command=['cmakegen.bat'],
-                           haltOnFailure=True,
-                           description='cmake gen',
-                           workdir='llvm\\build'))
-
-    # Build it.
-    f.addStep(batch_file_download.BatchFileDownload(name='makeall',
-                                command=["ninja", "-j", "%d" % jobs],
-                                haltOnFailure=True,
-                                workdir='llvm\\build'))
-
-    f.addStep(WarningCountingShellCommand(name='makeall',
-                                          command=['makeall.bat'],
-                                          haltOnFailure=True,
-                                          description='makeall',
-                                          workdir='llvm\\build'))
-
-    # Build global check project (make check) (sources not checked out...).
-    if 0:
-        f.addStep(batch_file_download.BatchFileDownload(name='makecheck',
-                                    command=["ninja", "check"],
-                                    workdir='llvm\\build'))
-        f.addStep(WarningCountingShellCommand(name='check',
-                                              command=['makecheck.bat'],
-                                              description='make check',
-                                              workdir='llvm\\build'))
-
-    # Build clang-test project (make clang-test).
-    f.addStep(batch_file_download.BatchFileDownload(name='maketest',
-                                                    command=["ninja", "clang-test"],
-                                                    workdir="llvm\\build"))
-    f.addStep(lit_test_command.LitTestCommand(name='clang-test',
-                                              command=["maketest.bat"],
-                                              workdir="llvm\\build"))
-    return f
-
 def addClangGCCTests(f, ignores={}, install_prefix="%(builddir)s/llvm.install",
                      languages = ('gcc', 'g++', 'objc', 'obj-c++')):
     make_vars = [WithProperties(
@@ -1041,231 +956,3 @@ def getClangTestsIgnoresFromPath(path, k
 
     return ignores
 
-from zorg.buildbot.util.phasedbuilderutils import getBuildDir, setProperty
-from zorg.buildbot.builders.Util import _did_last_build_fail
-from buildbot.steps.source.svn import SVN as HostSVN
-
-def phasedClang(config_options, is_bootstrap=True, use_lto=False,
-                incremental=False):
-    # Create an instance of the Builder.
-    f = buildbot.process.factory.BuildFactory()
-    # Determine the build directory.
-    f = getBuildDir(f)
-    # get rid of old archives from prior builds
-    f.addStep(buildbot.steps.shell.ShellCommand(
-            name='rm.archives', command=['sh', '-c', 'sudo rm -rfv *gz'],
-            haltOnFailure=False, description=['rm archives'],
-            workdir=WithProperties('%(builddir)s')))
-    # Clean the build directory.
-    clang_build_dir = 'clang-build'
-    if incremental:
-        f.addStep(buildbot.steps.shell.ShellCommand(
-                name='rm.clang-build', command=['sudo', 'rm', '-rfv',
-                                                clang_build_dir],
-                haltOnFailure=False, description=['rm dir', clang_build_dir],
-                workdir=WithProperties('%(builddir)s'),
-                doStepIf=_did_last_build_fail))
-    else:
-        f.addStep(buildbot.steps.shell.ShellCommand(
-                name='rm.clang-build', command=['sudo', 'rm', '-rfv',
-                                                clang_build_dir],
-                haltOnFailure=False, description=['rm dir', clang_build_dir],
-                workdir=WithProperties('%(builddir)s')))
-    
-    # Cleanup the clang link, which buildbot's SVN always_purge does not know
-    # (in 8.5 this changed to method='fresh')
-    # how to remove correctly. If we don't do this, the LLVM update steps will
-    # end up doing a clobber every time.
-    #
-    # FIXME: Should file a Trac for this, but I am lazy.
-    f.addStep(buildbot.steps.shell.ShellCommand(
-            name='rm.clang-sources-link',
-            command=['sudo', 'rm', '-rfv', 'llvm/tools/clang'],
-            haltOnFailure=False, description=['rm', 'clang sources link'],
-            workdir=WithProperties('%(builddir)s')))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-            name='rm.compiler-rt-sources-link',
-            command=['sudo', 'rm', '-rfv', 'llvm/projects/compiler-rt'],
-            haltOnFailure=False, description=['rm', 'compiler-rt sources link'],
-            workdir=WithProperties('%(builddir)s')))
-    # TODO: We used to use a symlink here but it seems to not work. I am trying
-    # to get this builder to work so I am just going to copy it instead.
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='rm.clang-tools-extra-source',
-              command=['sudo', 'rm', '-rfv', 'clang.src/tools/extra'],
-              haltOnFailure=True, workdir=WithProperties('%(builddir)s'),
-              description=['rm', 'clang-tools-extra sources']))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='rm.debuginfo-tests',
-              command=['sudo', 'rm', '-rfv', 'clang.src/test/debuginfo-tests'],
-              haltOnFailure=True, workdir=WithProperties('%(builddir)s'),
-              description=['rm', 'debuginfo-tests sources']))
-
-    # Pull sources.
-    f = phasedbuilderutils.SVNCleanupStep(f, 'llvm')
-    f.addStep(HostSVN(name='pull.llvm', mode='incremental', method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/llvm/trunk',
-                      retry=(60, 5), workdir='llvm', description='pull.llvm',
-                      alwaysUseLatest=False))
-    f = phasedbuilderutils.SVNCleanupStep(f, 'clang.src')
-    f.addStep(HostSVN(name='pull.clang', mode='incremental', method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/cfe/trunk',
-                      workdir='clang.src', retry=(60, 5),
-                      description='pull.clang', alwaysUseLatest=False))
-    f = phasedbuilderutils.SVNCleanupStep(f, 'clang-tools-extra.src')
-    f.addStep(HostSVN(name='pull.clang-tools-extra', mode='incremental',
-                      method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/'
-                              'clang-tools-extra/trunk',
-                      workdir='clang-tools-extra.src', alwaysUseLatest=False,
-                      retry=(60, 5), description='pull.clang-tools-extra'))
-    f = phasedbuilderutils.SVNCleanupStep(f, 'compiler-rt.src')
-    f.addStep(HostSVN(name='pull.compiler-rt', mode='incremental',
-                      method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/compiler-rt/'
-                              'trunk',
-                      workdir='compiler-rt.src', alwaysUseLatest=False,
-                      retry=(60, 5), description='pull.compiler-rt'))
-    f = phasedbuilderutils.SVNCleanupStep(f, 'libcxx.src')
-    f.addStep(HostSVN(name='pull.libcxx', mode='incremental',
-                      method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/libcxx/'
-                              'trunk',
-                      workdir='libcxx.src', alwaysUseLatest=False,
-                      retry=(60, 5), description='pull.libcxx'))
-    f = phasedbuilderutils.SVNCleanupStep(f, 'debuginfo-tests.src')
-    f.addStep(HostSVN(name='pull.debuginfo-tests', mode='incremental',
-                      method='fresh',
-                      repourl='http://llvm.org/svn/llvm-project/debuginfo-tests/'
-                              'trunk',
-                      workdir='debuginfo-tests.src', alwaysUseLatest=False,
-                      retry=(60, 5), description='pull.debuginfo-tests'))
-
-    # Create symlinks to the clang compiler-rt sources inside the LLVM tree.
-    # We don't actually check out the sources there, because the SVN purge
-    # would always remove them then.
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='ln.clang-sources', haltOnFailure=True,
-              command=['ln', '-sfv', '../../clang.src', 'clang'],
-              workdir='llvm/tools', description=['ln', 'clang sources']))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='ln.compiler-rt-sources',
-              command=['ln', '-sfv', '../../compiler-rt.src', 'compiler-rt'],
-              haltOnFailure=True, workdir='llvm/projects',
-              description=['ln', 'compiler-rt sources']))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='ln.libcxx.sources',
-              command=['ln', '-sfv', '../../libcxx.src', 'libcxx'],
-              haltOnFailure=True, workdir='llvm/projects',
-              description=['ln', 'libcxx sources']))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='cp.clang-tools-extra-sources',
-              command=['cp', '-Rfv', '../../clang-tools-extra.src', 'extra'],
-              haltOnFailure=True, workdir='clang.src/tools',
-              description=['cp', 'clang-tools-extra sources']))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='cp.debuginfo-tests.sources',
-              command=['cp', '-Rfv', 'debuginfo-tests.src',
-                       'clang.src/test/debuginfo-tests'],
-              haltOnFailure=True, workdir=WithProperties('%(builddir)s'),
-              description=['cp', 'debuginfo-tests sources']))
-
-    # Clean the install directory.
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='rm.clang-install', command=['sudo', 'rm', '-rfv', 'clang-install'],
-              haltOnFailure=False, description=['rm dir', 'clang-install'],
-              workdir=WithProperties('%(builddir)s')))
-    # Construct the configure arguments.
-    configure_args = ['../llvm/configure']
-    configure_args.extend(config_options)
-    configure_args.extend(['--disable-bindings',
-                           '--enable-keep-symbols',
-                           '--enable-targets=x86,x86_64,arm,aarch64'])
-    configure_args.append(
-        WithProperties('--prefix=%(builddir)s/clang-install'))    
-    
-    # If we are using a previously built compiler, download it and override CC
-    # and CXX.
-    if is_bootstrap:
-        f = artifacts.GetCompilerArtifacts(f)
-    else:
-        f = phasedbuilderutils.GetLatestValidated(f)
-    cc_command = ['find', 'host-compiler', '-name', 'clang']
-    f.addStep(buildbot.steps.shell.SetProperty(
-              name='find.cc',
-              command=cc_command,
-              extract_fn=phasedbuilderutils.find_cc,
-              workdir=WithProperties('%(builddir)s')))
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='sanity.test', haltOnFailure=True,
-              command=[WithProperties('%(builddir)s/%(cc_path)s'), '-v'],
-              description=['sanity test']))
-    configure_args.extend([
-            WithProperties('CC=%(builddir)s/%(cc_path)s'),
-            WithProperties('CXX=%(builddir)s/%(cc_path)s++')])
-    
-    # If we need to use lto, find liblto, add in proper flags here, etc.
-    if use_lto:
-        liblto_command = ['find', WithProperties('%(builddir)s/host-compiler'),
-                          '-name', 'libLTO.dylib']
-        f.addStep(buildbot.steps.shell.SetProperty(
-                name='find.liblto',
-                command=liblto_command,
-                extract_fn=phasedbuilderutils.find_liblto,
-                workdir=WithProperties('%(builddir)s')))
-        configure_args.append(
-          '--with-extra-options=-flto -gline-tables-only')
-    
-    # Configure the LLVM build.
-    if incremental:
-        # *NOTE* This is a temporary work around. I am eventually going to just
-        # set up cmake/ninja but for now I am sticking with the make => I need
-        # configure to run only after a failure so on success I have incremental
-        # builds.
-        f.addStep(buildbot.steps.shell.ShellCommand(
-                name='configure.with.host', command=configure_args,
-                haltOnFailure=True, description=['configure'],
-                workdir=clang_build_dir,
-                doStepIf=_did_last_build_fail))
-    else:
-        f.addStep(buildbot.steps.shell.ShellCommand(
-                name='configure.with.host', command=configure_args,
-                haltOnFailure=True, description=['configure'],
-                workdir=clang_build_dir))
-    
-    # Build the compiler.
-    make_command = ['make', '-j', WithProperties('%(jobs)s'), 'VERBOSE=1']
-    timeout = 40*60 # Normal timeout is 20 minutes.
-    if use_lto:
-        make_command.append(WithProperties('DYLD_LIBRARY_PATH=%(liblto_path)s'))
-        timeout = 240*60 # LTO timeout is 240 minutes.
-    
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='make', command=make_command,
-              haltOnFailure=True, description=['make'], workdir=clang_build_dir,
-              timeout=timeout))
-    # Use make install-clang to produce minimal archive for use by downstream
-    # builders.
-    f.addStep(buildbot.steps.shell.ShellCommand(
-              name='make.install-clang', haltOnFailure=True,
-              command=['make', 'install-clang', '-j',
-                       WithProperties('%(jobs)s'),
-                       'RC_SUPPORTED_ARCHS=armv7 i386 x86_64'],
-              description=['make install'], workdir=clang_build_dir))
-    # Save artifacts of this build for use by other builders.
-    f = artifacts.uploadArtifacts(f)
-    # Run the LLVM and Clang regression tests.
-    cmd_str = r"""make VERBOSE=1 LIT_ARGS="-v --param run_long_tests=true --param enable_console=1 --filter='^(?!.*debuginfo-tests)'" check-all"""
-    f.addStep(lit_test_command.LitTestCommand(name='run.llvm.tests', haltOnFailure=True,
-                                              command=cmd_str,
-                                              description=['all', 'tests'],
-                                              workdir=clang_build_dir))
-    # Work around for lldb issue rdar://14929651
-    # The crazy filter regex is to remove static-member[2].cpp, which requires xcode5 or later.
-    # radar://16295455 tracks the removal of this regex.
-    cmd_str = r"""make VERBOSE=1 LIT_ARGS="-j 1 -v --param run_long_tests=true --param enable_console=1 --filter='debuginfo-tests.(?!static-member)'" check-all"""
-    f.addStep(lit_test_command.LitTestCommand(name='run.llvm.debuginfo-tests', haltOnFailure=True,
-                                              command=cmd_str,
-                                              description=['all', 'tests'],
-                                              workdir=clang_build_dir))
-    return f




More information about the llvm-commits mailing list