First pass over Reid's document.
[oota-llvm.git] / docs / HowToReleaseLLVM.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2                       "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <title>How To Release LLVM To The Public</title>
6   <link rel="stylesheet" href="llvm.css" type="text/css">
7 </head>
8 <body>
9
10 <div class="doc_title">How To Release LLVM To The Public</div>
11 <p class="doc_warning">NOTE: THIS DOCUMENT IS A WORK IN PROGRESS!</p>
12 <ol>
13   <li><a href="#introduction">Introduction</a></li>
14   <li><a href="#process">Release Process</a></li>
15 </ol>
16 <div class="doc_author">
17   <p>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a></p>
18 </div>
19
20 <!-- *********************************************************************** -->
21 <div class="doc_section"><a name="introduction">Introduction</a></div>
22 <!-- *********************************************************************** -->
23
24 <div class="doc_text">
25 <p>This document collects information about successfully releasing LLVM to the
26 public. It is the release manager's guide to ensuring that a high quality build
27 of LLVM is released. Mostly, it's just a bunch of reminders of things to do at
28 release time so we don't inadvertently ship something that is utility 
29 deficient.</p>
30
31 <p>
32 There are three main tasks for building a release of LLVM:
33 <ol>
34   <li>Create the LLVM source distribution.</li>
35   <li>Create the LLVM GCC source distribtuion.</li>
36   <li>Create a set of LLVM GCC binary distribtuions for each supported
37       platform.  These binary distributions must include compiled versions
38       of the libraries found in <tt>llvm/runtime</tt> from the LLVM
39       source distribution created in Step 1.</li>
40 </ol>
41 </p>
42 </div>
43
44 <!-- *********************************************************************** -->
45 <div class="doc_section"><a name="process">Release Process</a></div>
46 <!-- *********************************************************************** -->
47
48 <!-- ======================================================================= -->
49 <div class="doc_subsection"><a name="overview">Process Overview</a></div>
50 <div class="doc_text">
51   <ol>
52     <li><a href="#updocs">Update Documentation</a></li>
53     <li><a href="#merge">Merge Branches</a></li>
54     <li><a href="#deps">Make LibDeps.txt</a></li>
55     <li><a href="#settle">Settle LLVM HEAD</a></li>
56     <li><a href="#tag">Tag LLVM and Create the Release Branch</a></li>
57     <li><a href="#build">Build LLVM</a></li>
58     <li><a href="#check">Run 'make check'</a></li>
59     <li><a href="#test">Run LLVM Test Suite</a></li>
60     <li><a href="#dist">Build the LLVM Source Distributions</a></li>
61     <li><a href="#llvmgccbin">Build the LLVM GCC Binary Distribution</a></li>
62   </ol>
63 </div>
64
65 <!-- ======================================================================= -->
66 <div class="doc_subsection"><a name="updocs">Update Documentation</a></div>
67 <div class="doc_text">
68   <p>
69   Review the documentation and ensure that it is up to date.  The Release Notes
70   must be updated to reflect bug fixes, new known issues, and changes in the
71   list of supported platforms.  The Getting Started Guide should be updated to
72   reflect the new release version number tag avaiable from CVS and changes in
73   basic system requirements.
74   </p>
75 </div>
76
77 <!-- ======================================================================= -->
78 <div class="doc_subsection"><a name="merge">Merge Branches</a></div>
79 <div class="doc_text">
80 <p>
81 Merge any work done on branches intended for release into mainline. Finish and
82 commit all new features or bug fixes that are scheduled to go into the release.
83 Work that is not to be incorporated into the release should not be merged from
84 branchs or commited from developer's working directories.
85 </p>
86
87 <p>
88 From this point until the release branch is created, developers should
89 <em>not</em>
90 commit changes to the llvm and llvm-gcc CVS repositories unless it is a bug
91 fix <em>for the release</em>.
92 </p>
93 </div>
94
95 <!-- ======================================================================= -->
96 <div class="doc_subsection"><a name="deps">Make LibDeps.txt</a></div>
97 <div class="doc_text">
98   <p>Rebuild the <tt>LibDeps.txt</tt> target in <tt>utils/llvm-config</tt>. This
99   makes sure that the <tt>llvm-config</tt> utility remains relevant for the
100   release, reflecting any changes in the library dependencies.</p>
101 </div>
102
103
104 <!-- ======================================================================= -->
105 <div class="doc_subsection"><a name="settle">Settle CVS HEAD</a></div>
106 <div class="doc_text">
107   <p>
108   Use the nightly test reports and 'make check' (deja-gnu based tests) to 
109   ensure that recent changes and merged branches have not destabilized LLVM.
110   Platforms which are used less often should be given special attention as they
111   are the most likely to break from commits from the previous step.
112   </p>
113 </div>
114
115 <!-- ======================================================================= -->
116 <div class="doc_subsection"><a name="tag">CVS Tag And Branch</a></div>
117 <div class="doc_text">
118   <p>Tag and branch the CVS HEAD using the following procedure:</p>
119   <ol>
120     <li>
121     Request all developers to refrain from committing. Offenders get commit
122     rights taken away (temporarily).
123     </li>
124
125     <li>
126     The Release Manager updates his/her llvm, llvm-test, and llvm-gcc source
127     trees with the
128     latest sources from mainline CVS.  The Release Manage may want to consider
129     using a new working directory for this to keep current uncommitted work
130     separate from release work.
131     </li>
132
133     <li>
134     The Release Manager tags his/her llvm, llvm-test, and llvm-gcc working
135     directories with
136     "ROOT_RELEASE_XX" where XX is the major and minor
137     release numbers (you can't have . in a cvs tag name). So, for Release 1.2,
138     XX=12 and for Release 1.10, XX=110.
139     </li>
140
141     <li>
142     Immediately create cvs branches based on the ROOT_RELEASE_XX tag. The tag
143     should be "release_XX" (where XX matches that used for the ROOT_RELEASE_XX
144     tag).  This is where the release distribution will be created.
145     </li>
146
147     <li>
148     Advise developers they can work on CVS HEAD again.
149     </li>
150
151     <li>
152     The Release Manager and any developers working on the release should switch
153     to the release branch (as all changes to the release will now be done in
154     the branch).  The easiest way to do this is to grab another working copy
155     using the following commands:
156
157     <p>
158     <tt>cvs -d &lt;CVS Repository&gt; co -r release_XX llvm</tt><br>
159     <tt>cvs -d &lt;CVS Repository&gt; co -r release_XX llvm-test</tt><br>
160     <tt>cvs -d &lt;CVS Repository&gt; co -r release_XX llvm-gcc</tt><br>
161     </p>
162     </li>
163 </div>
164
165 <!-- ======================================================================= -->
166 <div class="doc_subsection"><a name="build">Build LLVM</a></div>
167 <div class="doc_text">
168   <p>
169   Build both debug and release (optimized) versions of LLVM on all
170   platforms. Ensure the build is warning and error free on each platform.
171   </p>
172
173   <p>
174   Build a new version of the LLVM GCC front-end after building the LLVM tools.
175   Once that is complete, go back to the LLVM source tree and build and install
176   the <tt>llvm/runtime</tt> libraries.
177   </p>
178 </div>
179
180 <!-- ======================================================================= -->
181 <div class="doc_subsection"><a name="check">Run 'make check'</a></div>
182 <div class="doc_text">
183   <p>Run <tt>make check</tt> and ensure there are no unexpected failures. If
184   there are, resolve the failures, commit them back into the release branch,
185   and restart testing by <a href="#build">re-building LLVM</a>.
186   </p>
187
188   <p>
189   Ensure that 'make check' passes on all platforms for all targets. If certain
190   failures cannot be resolved before release time, determine if marking them
191   XFAIL is appropriate. If not, fix the bug and go back. The test suite must
192   complete with "0 unexpected failures" for release.
193   </p>
194 </div>
195
196 <!-- ======================================================================= -->
197 <div class="doc_subsection"><a name="test">LLVM Test Suite</a></div>
198 <div class="doc_text">
199   <p>Run the llvm-test suite and ensure there are no unacceptable failures.
200   If there are, resolve the failures and go back to
201   <a href="#build">re-building LLVM</a>. The test suite
202   should be run in Nightly Test mode. All tests must pass.
203 </div>
204
205 <!-- ======================================================================= -->
206 <div class="doc_subsection"><a name="dist">Build the LLVM Source Distributions</a></div>
207 <div class="doc_text">
208   <p>
209   Create source distributions for LLVM, LLVM GCC, and the LLVM Test Suite by
210   exporting the source
211   from CVS and archiving it.  This can be done with the following commands:
212   </p>
213
214   <p>
215   <tt>cvs -d &lt;CVS Repository&gt; export -r release_XX llvm</tt><br>
216   <tt>cvs -d &lt;CVS Repository&gt; export -r release_XX llvm-test</tt><br>
217   <tt>cvs -d &lt;CVS Repository&gt; export -r release_XX llvm-gcc</tt><br>
218   <tt>mkdir cfrontend; mv llvm-gcc cfrontend/src</tt><br>
219   <tt>tar -cvf - llvm          | gzip &gt; llvm-X.X.tar.gz</tt><br>
220   <tt>tar -cvf - llvm-test     | gzip &gt; llvm-test-X.X.tar.gz</tt><br>
221   <tt>tar -cvf - cfrontend/src | gzip &gt; cfrontend-X.X.source.tar.gz</tt><br>
222   </p>
223
224   <!-- This is a
225   two step process. First, use "make dist" to simply build the distribution. Any
226   failures need to be corrected (on the branch). Once "make dist" can be
227   successful, do "make dist-check". This target will do the same thing as the
228   'dist' target but also test that distribution to make sure it works. This
229   ensures that needed files are not missing and that the src tarball can be
230   successfully unbacked, built, installed, and cleaned. This two-level testing
231   needs to be done on each target platform.
232   -->
233 </div>
234
235 <!-- ======================================================================= -->
236 <div class="doc_subsection"><a name="llvmgccbin">Build the LLVM GCC Binary Distribution</a></div>
237 <div class="doc_text">
238   <p>
239   Creating the LLVM GCC binary distribution requires performing the following
240   steps for each supported platform:
241   </p>
242
243   <ol>
244     <li>
245     Build the LLVM GCC front-end.  The LLVM GCC front-end must be installed in
246     a directory named <tt>cfrontend/&lt;platform&gt;/llvm-gcc</tt>.  For
247     example, the Sparc/Solaris directory is named
248     <tt>cfrontend/sparc/llvm-gcc</tt>.
249     </li>
250
251     <li>
252     Build the libraries in <tt>llvm/runtime</tt> and install them into the 
253     created LLVM GCC installation directory.
254     </li>
255
256     <li>
257     For systems with non-distributable header files (e.g. Solaris), manually
258     remove header files that the GCC build process has "fixed."  This process
259     is admittedly painful, but not as bad as it looks; these header files are
260     almost always easily identifiable with simple grep expressions and are
261     installed in only a few directories in the GCC installation directory.
262     </li>
263
264     <li>
265     Add the copyright files and header file fix script.
266     </li>
267
268     <li>
269     Archive and compress the installation directory.  These can be found in
270     previous releases of the LLVM-GCC front-end.
271     </li>
272   </ol>
273 </div>
274
275 <!--
276 <!-- ======================================================================= -->
277 <div class="doc_subsection"><a name="release">Release</a></div>
278 <div class="doc_text">
279   <p>Release the distribution tarball to the public. This consists of generating
280   several tarballs. The first set, the source distributions, are automatically
281   generated by the "make dist" and "make dist-check". There are gzip, bzip2, and
282   zip versions of these bundles.</p>
283   <p>The second set of tarballs is the binary release. When "make dist-check"
284   succeeds, it will have created an _install directory into which it installed
285   the binary release. You need to rename that directory as "llvm" and then
286   create tarballs from the contents of that "llvm" directory.</p>
287   <p>Finally, use rpm to make an rpm package based on the llvm.spec file. Don't
288   forget to update the version number, documentation, etc. in the llvm.spec
289   file.</p>
290 </div>
291 -->
292
293 <!-- *********************************************************************** -->
294 <hr>
295 <address>
296   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
297   src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
298   <a href="http://validator.w3.org/check/referer"><img
299   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
300
301   <a href="mailto:rspencer@x10sys.com">Reid Spencer</a><br>
302   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
303   <br/>
304   Last modified: $Date$
305 </address>
306 </body>
307 </html>