blob: eb6c838a2160be0a8068411f94f701598e701b7e [file] [log] [blame]
Dmitri Gribenko69c02392012-12-07 16:42:48 +00001=================================
2How To Release LLVM To The Public
3=================================
4
5.. contents::
6 :local:
Dmitri Gribenko76d182f2012-12-09 15:29:56 +00007 :depth: 1
Dmitri Gribenko69c02392012-12-07 16:42:48 +00008
9.. sectionauthor:: Tanya Lattner <tonic@nondot.org>,
10 Reid Spencer <rspencer@x10sys.com>,
11 John Criswell <criswell@cs.uiuc.edu> and
12 Bill Wendling <wendling@apple.com>
13
14Introduction
15============
16
17This document contains information about successfully releasing LLVM ---
18including subprojects: e.g., ``clang`` and ``dragonegg`` --- to the public. It
19is the Release Manager's responsibility to ensure that a high quality build of
20LLVM is released.
21
22.. _timeline:
23
24Release Timeline
25================
26
27LLVM is released on a time based schedule --- roughly every 6 months. We do
28not normally have dot releases because of the nature of LLVM's incremental
29development philosophy. That said, the only thing preventing dot releases for
30critical bug fixes from happening is a lack of resources --- testers,
31machines, time, etc. And, because of the high quality we desire for LLVM
32releases, we cannot allow for a truncated form of release qualification.
33
34The release process is roughly as follows:
35
36* Set code freeze and branch creation date for 6 months after last code freeze
37 date. Announce release schedule to the LLVM community and update the website.
38
39* Create release branch and begin release process.
40
41* Send out release candidate sources for first round of testing. Testing lasts
42 7-10 days. During the first round of testing, any regressions found should be
43 fixed. Patches are merged from mainline into the release branch. Also, all
44 features need to be completed during this time. Any features not completed at
45 the end of the first round of testing will be removed or disabled for the
46 release.
47
48* Generate and send out the second release candidate sources. Only *critial*
49 bugs found during this testing phase will be fixed. Any bugs introduced by
50 merged patches will be fixed. If so a third round of testing is needed.
51
52* The release notes are updated.
53
54* Finally, release!
55
Dmitri Gribenko69c02392012-12-07 16:42:48 +000056Release Process
57===============
58
Dmitri Gribenko76d182f2012-12-09 15:29:56 +000059.. contents::
60 :local:
Dmitri Gribenko69c02392012-12-07 16:42:48 +000061
62Release Administrative Tasks
63----------------------------
64
65This section describes a few administrative tasks that need to be done for the
66release process to begin. Specifically, it involves:
67
68* Creating the release branch,
69
70* Setting version numbers, and
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000071
Dmitri Gribenko69c02392012-12-07 16:42:48 +000072* Tagging release candidates for the release team to begin testing.
73
Dmitri Gribenko69c02392012-12-07 16:42:48 +000074Create Release Branch
75^^^^^^^^^^^^^^^^^^^^^
76
77Branch the Subversion trunk using the following procedure:
78
79#. Remind developers that the release branching is imminent and to refrain from
80 committing patches that might break the build. E.g., new features, large
81 patches for works in progress, an overhaul of the type system, an exciting
82 new TableGen feature, etc.
83
84#. Verify that the current Subversion trunk is in decent shape by
85 examining nightly tester and buildbot results.
86
87#. Create the release branch for ``llvm``, ``clang``, the ``test-suite``, and
88 ``dragonegg`` from the last known good revision. The branch's name is
89 ``release_XY``, where ``X`` is the major and ``Y`` the minor release
90 numbers. The branches should be created using the following commands:
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000091
Dmitri Gribenko69c02392012-12-07 16:42:48 +000092 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000093
Dmitri Gribenko69c02392012-12-07 16:42:48 +000094 $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \
95 https://llvm.org/svn/llvm-project/llvm/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000096
Dmitri Gribenko69c02392012-12-07 16:42:48 +000097 $ svn copy https://llvm.org/svn/llvm-project/cfe/trunk \
98 https://llvm.org/svn/llvm-project/cfe/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000099
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000100 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/trunk \
101 https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000102
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000103 $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \
104 https://llvm.org/svn/llvm-project/test-suite/branches/release_XY
105
106#. Advise developers that they may now check their patches into the Subversion
107 tree again.
108
109#. The Release Manager should switch to the release branch, because all changes
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000110 to the release will now be done in the branch. The easiest way to do this is
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000111 to grab a working copy using the following commands:
112
113 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000114
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000115 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000116
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000117 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000118
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000119 $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000120
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000121 $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
122
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000123Update LLVM Version
124^^^^^^^^^^^^^^^^^^^
125
126After creating the LLVM release branch, update the release branches'
127``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
128Update it on mainline as well to be the next version ('``X.Y+1svn``').
129Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
130
131In addition, the version numbers of all the Bugzilla components must be updated
132for the next release.
133
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000134Build the LLVM Release Candidates
135^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
137Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM
138``test-suite`` by tagging the branch with the respective release candidate
139number. For instance, to create **Release Candidate 1** you would issue the
140following commands:
141
142::
143
144 $ svn mkdir https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY
145 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
146 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000147
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000148 $ svn mkdir https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY
149 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
150 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1
151
152 $ svn mkdir https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY
153 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
154 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1
155
156 $ svn mkdir https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY
157 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
158 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1
159
160Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps
161a permanent copy of the release candidate around for people to export and build
162as they wish. The final released sources will be tagged in the ``RELEASE_XY``
Dmitri Gribenko76d182f2012-12-09 15:29:56 +0000163directory as ``Final`` (c.f. :ref:`tag`).
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000164
165The Release Manager may supply pre-packaged source tarballs for users. This can
166be done with the following commands:
167
168::
169
170 $ svn export https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 llvm-X.Yrc1
171 $ svn export https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 clang-X.Yrc1
172 $ svn export https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 dragonegg-X.Yrc1
173 $ svn export https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1 llvm-test-X.Yrc1
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000174
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000175 $ tar -cvf - llvm-X.Yrc1 | gzip > llvm-X.Yrc1.src.tar.gz
176 $ tar -cvf - clang-X.Yrc1 | gzip > clang-X.Yrc1.src.tar.gz
177 $ tar -cvf - dragonegg-X.Yrc1 | gzip > dragonegg-X.Yrc1.src.tar.gz
178 $ tar -cvf - llvm-test-X.Yrc1 | gzip > llvm-test-X.Yrc1.src.tar.gz
179
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000180Building the Release
181--------------------
182
183The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of
184errors and warnings in Debug, Release+Asserts, and Release builds. If all
185builds are clean, then the release passes Build Qualification.
186
187The ``make`` options for building the different modes:
188
189+-----------------+---------------------------------------------+
190| Mode | Options |
191+=================+=============================================+
192| Debug | ``ENABLE_OPTIMIZED=0`` |
193+-----------------+---------------------------------------------+
194| Release+Asserts | ``ENABLE_OPTIMIZED=1`` |
195+-----------------+---------------------------------------------+
196| Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` |
197+-----------------+---------------------------------------------+
198
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000199Build LLVM
200^^^^^^^^^^
201
202Build ``Debug``, ``Release+Asserts``, and ``Release`` versions
203of ``llvm`` on all supported platforms. Directions to build ``llvm``
204are :ref:`here <getting_started>`.
205
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000206Build Clang Binary Distribution
207^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
208
209Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release)
210requires performing the following steps for each supported platform:
211
212#. Build clang according to the directions `here
213 <http://clang.llvm.org/get_started.html>`__.
214
215#. Build both a Debug and Release version of clang. The binary will be the
216 Release build.
217
218#. Package ``clang`` (details to follow).
219
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000220Target Specific Build Details
221^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222
223The table below specifies which compilers are used for each Arch/OS combination
224when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``.
225
226+--------------+---------------+----------------------+
227| Architecture | OS | compiler |
228+==============+===============+======================+
229| x86-32 | Mac OS 10.5 | gcc 4.0.1 |
230+--------------+---------------+----------------------+
231| x86-32 | Linux | gcc 4.2.X, gcc 4.3.X |
232+--------------+---------------+----------------------+
233| x86-32 | FreeBSD | gcc 4.2.X |
234+--------------+---------------+----------------------+
235| x86-32 | mingw | gcc 3.4.5 |
236+--------------+---------------+----------------------+
237| x86-64 | Mac OS 10.5 | gcc 4.0.1 |
238+--------------+---------------+----------------------+
239| x86-64 | Linux | gcc 4.2.X, gcc 4.3.X |
240+--------------+---------------+----------------------+
241| x86-64 | FreeBSD | gcc 4.2.X |
242+--------------+---------------+----------------------+
243
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000244Release Qualification Criteria
245------------------------------
246
247A release is qualified when it has no regressions from the previous release (or
248baseline). Regressions are related to correctness first and performance second.
249(We may tolerate some minor performance regressions if they are deemed
250necessary for the general quality of the compiler.)
251
252**Regressions are new failures in the set of tests that are used to qualify
253each product and only include things on the list. Every release will have
254some bugs in it. It is the reality of developing a complex piece of
255software. We need a very concrete and definitive release criteria that
256ensures we have monotonically improving quality on some metric. The metric we
257use is described below. This doesn't mean that we don't care about other
258criteria, but these are the criteria which we found to be most important and
259which must be satisfied before a release can go out.**
260
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000261Qualify LLVM
262^^^^^^^^^^^^
263
264LLVM is qualified when it has a clean test run without a front-end. And it has
265no regressions when using either ``clang`` or ``dragonegg`` with the
266``test-suite`` from the previous release.
267
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000268Qualify Clang
269^^^^^^^^^^^^^
270
271``Clang`` is qualified when front-end specific tests in the ``llvm`` dejagnu
272test suite all pass, clang's own test suite passes cleanly, and there are no
273regressions in the ``test-suite``.
274
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000275Specific Target Qualification Details
276^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277
278+--------------+-------------+----------------+-----------------------------+
279| Architecture | OS | clang baseline | tests |
280+==============+=============+================+=============================+
281| x86-32 | Linux | last release | llvm dejagnu, |
282| | | | clang tests, |
283| | | | test-suite (including spec) |
284+--------------+-------------+----------------+-----------------------------+
285| x86-32 | FreeBSD | last release | llvm dejagnu, |
286| | | | clang tests, |
287| | | | test-suite |
288+--------------+-------------+----------------+-----------------------------+
289| x86-32 | mingw | none | QT |
290+--------------+-------------+----------------+-----------------------------+
291| x86-64 | Mac OS 10.X | last release | llvm dejagnu, |
292| | | | clang tests, |
293| | | | test-suite (including spec) |
294+--------------+-------------+----------------+-----------------------------+
295| x86-64 | Linux | last release | llvm dejagnu, |
296| | | | clang tests, |
297| | | | test-suite (including spec) |
298+--------------+-------------+----------------+-----------------------------+
299| x86-64 | FreeBSD | last release | llvm dejagnu, |
300| | | | clang tests, |
301| | | | test-suite |
302+--------------+-------------+----------------+-----------------------------+
303
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000304Community Testing
305-----------------
306
307Once all testing has been completed and appropriate bugs filed, the release
308candidate tarballs are put on the website and the LLVM community is notified.
309Ask that all LLVM developers test the release in 2 ways:
310
311#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
312 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
313 TEST=nightly report``).
314
315#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
316 everything. Run ``make check`` and the full LLVM test suite (``make
317 TEST=nightly report``).
318
319Ask LLVM developers to submit the test suite report and ``make check`` results
320to the list. Verify that there are no regressions from the previous release.
321The results are not used to qualify a release, but to spot other potential
322problems. For unsupported targets, verify that ``make check`` is at least
323clean.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000324
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000325During the first round of testing, all regressions must be fixed before the
326second release candidate is tagged.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000327
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000328If this is the second round of testing, the testing is only to ensure that bug
329fixes previously merged in have not created new major problems. *This is not
330the time to solve additional and unrelated bugs!* If no patches are merged in,
331the release is determined to be ready and the release manager may move onto the
332next stage.
333
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000334Release Patch Rules
335-------------------
336
337Below are the rules regarding patching the release branch:
338
339#. Patches applied to the release branch may only be applied by the release
340 manager.
341
342#. During the first round of testing, patches that fix regressions or that are
343 small and relatively risk free (verified by the appropriate code owner) are
344 applied to the branch. Code owners are asked to be very conservative in
345 approving patches for the branch. We reserve the right to reject any patch
346 that does not fix a regression as previously defined.
347
348#. During the remaining rounds of testing, only patches that fix critical
349 regressions may be applied.
350
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000351Release Final Tasks
352-------------------
353
354The final stages of the release process involves tagging the "final" release
355branch, updating documentation that refers to the release, and updating the
356demo page.
357
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000358Update Documentation
359^^^^^^^^^^^^^^^^^^^^
360
361Review the documentation and ensure that it is up to date. The "Release Notes"
362must be updated to reflect new features, bug fixes, new known issues, and
363changes in the list of supported platforms. The "Getting Started Guide" should
364be updated to reflect the new release version number tag available from
365Subversion and changes in basic system requirements. Merge both changes from
366mainline into the release branch.
367
368.. _tag:
369
370Tag the LLVM Final Release
371^^^^^^^^^^^^^^^^^^^^^^^^^^
372
373Tag the final release sources using the following procedure:
374
375::
376
377 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
378 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000379
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000380 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
381 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000382
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000383 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
384 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000385
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000386 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
387 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final
388
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000389Update the LLVM Demo Page
390-------------------------
391
392The LLVM demo page must be updated to use the new release. This consists of
393using the new ``clang`` binary and building LLVM.
394
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000395Update the LLVM Website
396^^^^^^^^^^^^^^^^^^^^^^^
397
398The website must be updated before the release announcement is sent out. Here
399is what to do:
400
401#. Check out the ``www`` module from Subversion.
402
403#. Create a new subdirectory ``X.Y`` in the releases directory.
404
405#. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
406 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
407
408#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
409 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
410
411#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
412 from previous release).
413
414#. Update the ``releases/download.html`` file with the new release.
415
416#. Update the ``releases/index.html`` with the new release and link to release
417 documentation.
418
419#. Finally, update the main page (``index.html`` and sidebar) to point to the
420 new release and release announcement. Make sure this all gets committed back
421 into Subversion.
422
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000423Announce the Release
424^^^^^^^^^^^^^^^^^^^^
425
426Have Chris send out the release announcement when everything is finished.
427