<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 9:30 AM, Galina Kistanova via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gkistanova<br>
Date: Mon Nov 16 11:30:42 2015<br>
New Revision: 253237<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=253237&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=253237&view=rev</a><br>
Log:<br>
Always build the stage 2 cleanly.<br>
<br>
If the compiler has been changed on the stage 1, we cannot trust any of the intermediate file from the old compiler. And if the stage 1 compiler is the same, we should not build in the first place.<br></blockquote><div><br></div><div>Is this test implemented (the "if the stage 1 compiler is the same" test)? I don't imagine it'd fire that often, but it could be useful to avoid documentation changes triggering stage 2 compilations unnecessarily.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
zorg/trunk/zorg/buildbot/builders/ClangBuilder.py<br>
<br>
Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=253237&r1=253236&r2=253237&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=253237&r1=253236&r2=253237&view=diff</a><br>
==============================================================================<br>
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)<br>
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Mon Nov 16 11:30:42 2015<br>
@@ -319,16 +319,16 @@ def getClangBuildFactory(<br>
<br>
# Clean up llvm (stage 2).<br>
#<br>
- # FIXME: It does not make much sense to skip this for a bootstrap builder.<br>
- # Check whether there is any reason to skip cleaning here and if not, remove<br>
- # this condition.<br>
- if clean or cmake:<br>
- f.addStep(ShellCommand(name="rm-llvm.obj.stage2",<br>
- command=["rm", "-rf", llvm_2_objdir],<br>
- haltOnFailure=True,<br>
- description=["rm build dir", "llvm", "(stage 2)"],<br>
- workdir=".",<br>
- env=merged_env))<br>
+ # We always cleanly build the stage 2. If the compiler has been<br>
+ # changed on the stage 1, we cannot trust any of the intermediate file<br>
+ # from the old compiler. And if the stage 1 compiler is the same, we should<br>
+ # not build in the first place.<br>
+ f.addStep(ShellCommand(name="rm-llvm.obj.stage2",<br>
+ command=["rm", "-rf", llvm_2_objdir],<br>
+ haltOnFailure=True,<br>
+ description=["rm build dir", "llvm", "(stage 2)"],<br>
+ workdir=".",<br>
+ env=merged_env))<br>
<br>
# Configure llvm (stage 2).<br>
if not cmake:<br>
@@ -620,20 +620,17 @@ def getClangCMakeBuildFactory(<br>
<br>
############# STAGE 2<br>
if useTwoStage:<br>
- if clean:<br>
- f.addStep(ShellCommand(name='clean stage 2',<br>
- command=['rm','-rf',stage2_build],<br>
- warnOnFailure=True,<br>
- description='cleaning stage 2',<br>
- descriptionDone='clean',<br>
- workdir='.',<br>
- env=env))<br>
- else:<br>
- f.addStep(SetProperty(name="check ninja files 2",<br>
- workdir=stage2_build,<br>
- command=check_build_cmd,<br>
- flunkOnFailure=False,<br>
- property="exists_ninja_2"))<br>
+ # We always cleanly build the stage 2. If the compiler has been<br>
+ # changed on the stage 1, we cannot trust any of the intermediate file<br>
+ # from the old compiler. And if the stage 1 compiler is the same, we<br>
+ # should not build in the first place.<br>
+ f.addStep(ShellCommand(name='clean stage 2',<br>
+ command=['rm','-rf',stage2_build],<br>
+ warnOnFailure=True,<br>
+ description='cleaning stage 2',<br>
+ descriptionDone='clean',<br>
+ workdir='.',<br>
+ env=env))<br>
<br>
# Set the compiler using the CC and CXX environment variables to work around<br>
# backslash string escaping bugs somewhere between buildbot and cmake. The<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>