blob: 31877bd35ac895bf13750c59832f45e17a912db7 [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
Dmitri Gribenko69c02392012-12-07 16:42:48 +00009Introduction
10============
11
12This document contains information about successfully releasing LLVM ---
13including subprojects: e.g., ``clang`` and ``dragonegg`` --- to the public. It
14is the Release Manager's responsibility to ensure that a high quality build of
15LLVM is released.
16
17.. _timeline:
18
19Release Timeline
20================
21
22LLVM is released on a time based schedule --- roughly every 6 months. We do
23not normally have dot releases because of the nature of LLVM's incremental
24development philosophy. That said, the only thing preventing dot releases for
25critical bug fixes from happening is a lack of resources --- testers,
26machines, time, etc. And, because of the high quality we desire for LLVM
27releases, we cannot allow for a truncated form of release qualification.
28
29The release process is roughly as follows:
30
31* Set code freeze and branch creation date for 6 months after last code freeze
32 date. Announce release schedule to the LLVM community and update the website.
33
34* Create release branch and begin release process.
35
36* Send out release candidate sources for first round of testing. Testing lasts
37 7-10 days. During the first round of testing, any regressions found should be
38 fixed. Patches are merged from mainline into the release branch. Also, all
39 features need to be completed during this time. Any features not completed at
40 the end of the first round of testing will be removed or disabled for the
41 release.
42
43* Generate and send out the second release candidate sources. Only *critial*
44 bugs found during this testing phase will be fixed. Any bugs introduced by
45 merged patches will be fixed. If so a third round of testing is needed.
46
47* The release notes are updated.
48
49* Finally, release!
50
Dmitri Gribenko69c02392012-12-07 16:42:48 +000051Release Process
52===============
53
Dmitri Gribenko76d182f2012-12-09 15:29:56 +000054.. contents::
55 :local:
Dmitri Gribenko69c02392012-12-07 16:42:48 +000056
57Release Administrative Tasks
58----------------------------
59
60This section describes a few administrative tasks that need to be done for the
61release process to begin. Specifically, it involves:
62
63* Creating the release branch,
64
65* Setting version numbers, and
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000066
Dmitri Gribenko69c02392012-12-07 16:42:48 +000067* Tagging release candidates for the release team to begin testing.
68
Dmitri Gribenko69c02392012-12-07 16:42:48 +000069Create Release Branch
70^^^^^^^^^^^^^^^^^^^^^
71
72Branch the Subversion trunk using the following procedure:
73
74#. Remind developers that the release branching is imminent and to refrain from
75 committing patches that might break the build. E.g., new features, large
76 patches for works in progress, an overhaul of the type system, an exciting
77 new TableGen feature, etc.
78
79#. Verify that the current Subversion trunk is in decent shape by
80 examining nightly tester and buildbot results.
81
82#. Create the release branch for ``llvm``, ``clang``, the ``test-suite``, and
83 ``dragonegg`` from the last known good revision. The branch's name is
84 ``release_XY``, where ``X`` is the major and ``Y`` the minor release
85 numbers. The branches should be created using the following commands:
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000086
Dmitri Gribenko69c02392012-12-07 16:42:48 +000087 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000088
Dmitri Gribenko69c02392012-12-07 16:42:48 +000089 $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \
90 https://llvm.org/svn/llvm-project/llvm/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000091
Dmitri Gribenko69c02392012-12-07 16:42:48 +000092 $ svn copy https://llvm.org/svn/llvm-project/cfe/trunk \
93 https://llvm.org/svn/llvm-project/cfe/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000094
Dmitri Gribenko69c02392012-12-07 16:42:48 +000095 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/trunk \
96 https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000097
Dmitri Gribenko69c02392012-12-07 16:42:48 +000098 $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \
99 https://llvm.org/svn/llvm-project/test-suite/branches/release_XY
100
101#. Advise developers that they may now check their patches into the Subversion
102 tree again.
103
104#. The Release Manager should switch to the release branch, because all changes
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000105 to the release will now be done in the branch. The easiest way to do this is
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000106 to grab a working copy using the following commands:
107
108 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000109
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000110 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000111
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000112 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000113
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000114 $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000115
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000116 $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
117
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000118Update LLVM Version
119^^^^^^^^^^^^^^^^^^^
120
121After creating the LLVM release branch, update the release branches'
122``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
123Update it on mainline as well to be the next version ('``X.Y+1svn``').
124Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
125
126In addition, the version numbers of all the Bugzilla components must be updated
127for the next release.
128
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000129Build the LLVM Release Candidates
130^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131
132Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM
133``test-suite`` by tagging the branch with the respective release candidate
134number. For instance, to create **Release Candidate 1** you would issue the
135following commands:
136
137::
138
139 $ svn mkdir https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY
140 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
141 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000142
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000143 $ svn mkdir https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY
144 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
145 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1
146
147 $ svn mkdir https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY
148 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
149 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1
150
151 $ svn mkdir https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY
152 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
153 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1
154
155Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps
156a permanent copy of the release candidate around for people to export and build
157as they wish. The final released sources will be tagged in the ``RELEASE_XY``
Dmitri Gribenko76d182f2012-12-09 15:29:56 +0000158directory as ``Final`` (c.f. :ref:`tag`).
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000159
160The Release Manager may supply pre-packaged source tarballs for users. This can
161be done with the following commands:
162
163::
164
165 $ svn export https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 llvm-X.Yrc1
166 $ svn export https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 clang-X.Yrc1
167 $ svn export https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 dragonegg-X.Yrc1
168 $ 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 +0000169
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000170 $ tar -cvf - llvm-X.Yrc1 | gzip > llvm-X.Yrc1.src.tar.gz
171 $ tar -cvf - clang-X.Yrc1 | gzip > clang-X.Yrc1.src.tar.gz
172 $ tar -cvf - dragonegg-X.Yrc1 | gzip > dragonegg-X.Yrc1.src.tar.gz
173 $ tar -cvf - llvm-test-X.Yrc1 | gzip > llvm-test-X.Yrc1.src.tar.gz
174
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000175Building the Release
176--------------------
177
178The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of
179errors and warnings in Debug, Release+Asserts, and Release builds. If all
180builds are clean, then the release passes Build Qualification.
181
182The ``make`` options for building the different modes:
183
184+-----------------+---------------------------------------------+
185| Mode | Options |
186+=================+=============================================+
187| Debug | ``ENABLE_OPTIMIZED=0`` |
188+-----------------+---------------------------------------------+
189| Release+Asserts | ``ENABLE_OPTIMIZED=1`` |
190+-----------------+---------------------------------------------+
191| Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` |
192+-----------------+---------------------------------------------+
193
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000194Build LLVM
195^^^^^^^^^^
196
197Build ``Debug``, ``Release+Asserts``, and ``Release`` versions
198of ``llvm`` on all supported platforms. Directions to build ``llvm``
Sean Silvaa7aec402013-01-11 02:28:08 +0000199are :doc:`here <GettingStarted>`.
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000200
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000201Build Clang Binary Distribution
202^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
203
204Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release)
205requires performing the following steps for each supported platform:
206
207#. Build clang according to the directions `here
208 <http://clang.llvm.org/get_started.html>`__.
209
210#. Build both a Debug and Release version of clang. The binary will be the
211 Release build.
212
213#. Package ``clang`` (details to follow).
214
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000215Target Specific Build Details
216^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217
218The table below specifies which compilers are used for each Arch/OS combination
219when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``.
220
221+--------------+---------------+----------------------+
222| Architecture | OS | compiler |
223+==============+===============+======================+
224| x86-32 | Mac OS 10.5 | gcc 4.0.1 |
225+--------------+---------------+----------------------+
226| x86-32 | Linux | gcc 4.2.X, gcc 4.3.X |
227+--------------+---------------+----------------------+
228| x86-32 | FreeBSD | gcc 4.2.X |
229+--------------+---------------+----------------------+
230| x86-32 | mingw | gcc 3.4.5 |
231+--------------+---------------+----------------------+
232| x86-64 | Mac OS 10.5 | gcc 4.0.1 |
233+--------------+---------------+----------------------+
234| x86-64 | Linux | gcc 4.2.X, gcc 4.3.X |
235+--------------+---------------+----------------------+
236| x86-64 | FreeBSD | gcc 4.2.X |
237+--------------+---------------+----------------------+
238
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000239Release Qualification Criteria
240------------------------------
241
242A release is qualified when it has no regressions from the previous release (or
243baseline). Regressions are related to correctness first and performance second.
244(We may tolerate some minor performance regressions if they are deemed
245necessary for the general quality of the compiler.)
246
247**Regressions are new failures in the set of tests that are used to qualify
248each product and only include things on the list. Every release will have
249some bugs in it. It is the reality of developing a complex piece of
250software. We need a very concrete and definitive release criteria that
251ensures we have monotonically improving quality on some metric. The metric we
252use is described below. This doesn't mean that we don't care about other
253criteria, but these are the criteria which we found to be most important and
254which must be satisfied before a release can go out.**
255
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000256Qualify LLVM
257^^^^^^^^^^^^
258
259LLVM is qualified when it has a clean test run without a front-end. And it has
260no regressions when using either ``clang`` or ``dragonegg`` with the
261``test-suite`` from the previous release.
262
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000263Qualify Clang
264^^^^^^^^^^^^^
265
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000266``Clang`` is qualified when front-end specific tests in the ``llvm`` regression
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000267test suite all pass, clang's own test suite passes cleanly, and there are no
268regressions in the ``test-suite``.
269
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000270Specific Target Qualification Details
271^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
272
273+--------------+-------------+----------------+-----------------------------+
274| Architecture | OS | clang baseline | tests |
275+==============+=============+================+=============================+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000276| x86-32 | Linux | last release | llvm regression tests, |
277| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000278| | | | test-suite (including spec) |
279+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000280| x86-32 | FreeBSD | last release | llvm regression tests, |
281| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000282| | | | test-suite |
283+--------------+-------------+----------------+-----------------------------+
284| x86-32 | mingw | none | QT |
285+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000286| x86-64 | Mac OS 10.X | last release | llvm regression tests, |
287| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000288| | | | test-suite (including spec) |
289+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000290| x86-64 | Linux | last release | llvm regression tests, |
291| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000292| | | | test-suite (including spec) |
293+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000294| x86-64 | FreeBSD | last release | llvm regression tests, |
295| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000296| | | | test-suite |
297+--------------+-------------+----------------+-----------------------------+
298
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000299Community Testing
300-----------------
301
302Once all testing has been completed and appropriate bugs filed, the release
303candidate tarballs are put on the website and the LLVM community is notified.
304Ask that all LLVM developers test the release in 2 ways:
305
306#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
307 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
308 TEST=nightly report``).
309
310#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
311 everything. Run ``make check`` and the full LLVM test suite (``make
312 TEST=nightly report``).
313
314Ask LLVM developers to submit the test suite report and ``make check`` results
315to the list. Verify that there are no regressions from the previous release.
316The results are not used to qualify a release, but to spot other potential
317problems. For unsupported targets, verify that ``make check`` is at least
318clean.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000319
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000320During the first round of testing, all regressions must be fixed before the
321second release candidate is tagged.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000322
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000323If this is the second round of testing, the testing is only to ensure that bug
324fixes previously merged in have not created new major problems. *This is not
325the time to solve additional and unrelated bugs!* If no patches are merged in,
326the release is determined to be ready and the release manager may move onto the
327next stage.
328
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000329Release Patch Rules
330-------------------
331
332Below are the rules regarding patching the release branch:
333
334#. Patches applied to the release branch may only be applied by the release
335 manager.
336
337#. During the first round of testing, patches that fix regressions or that are
338 small and relatively risk free (verified by the appropriate code owner) are
339 applied to the branch. Code owners are asked to be very conservative in
340 approving patches for the branch. We reserve the right to reject any patch
341 that does not fix a regression as previously defined.
342
343#. During the remaining rounds of testing, only patches that fix critical
344 regressions may be applied.
345
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000346Release Final Tasks
347-------------------
348
349The final stages of the release process involves tagging the "final" release
350branch, updating documentation that refers to the release, and updating the
351demo page.
352
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000353Update Documentation
354^^^^^^^^^^^^^^^^^^^^
355
356Review the documentation and ensure that it is up to date. The "Release Notes"
357must be updated to reflect new features, bug fixes, new known issues, and
358changes in the list of supported platforms. The "Getting Started Guide" should
359be updated to reflect the new release version number tag available from
360Subversion and changes in basic system requirements. Merge both changes from
361mainline into the release branch.
362
363.. _tag:
364
365Tag the LLVM Final Release
366^^^^^^^^^^^^^^^^^^^^^^^^^^
367
368Tag the final release sources using the following procedure:
369
370::
371
372 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
373 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000374
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000375 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
376 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000377
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000378 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
379 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000380
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000381 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
382 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final
383
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000384Update the LLVM Demo Page
385-------------------------
386
387The LLVM demo page must be updated to use the new release. This consists of
388using the new ``clang`` binary and building LLVM.
389
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000390Update the LLVM Website
391^^^^^^^^^^^^^^^^^^^^^^^
392
393The website must be updated before the release announcement is sent out. Here
394is what to do:
395
396#. Check out the ``www`` module from Subversion.
397
398#. Create a new subdirectory ``X.Y`` in the releases directory.
399
400#. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
401 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
402
403#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
404 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
405
406#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
407 from previous release).
408
409#. Update the ``releases/download.html`` file with the new release.
410
411#. Update the ``releases/index.html`` with the new release and link to release
412 documentation.
413
414#. Finally, update the main page (``index.html`` and sidebar) to point to the
415 new release and release announcement. Make sure this all gets committed back
416 into Subversion.
417
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000418Announce the Release
419^^^^^^^^^^^^^^^^^^^^
420
421Have Chris send out the release announcement when everything is finished.
422