blob: bc3b093d755e484da0dd005384e8c386406c9b64 [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
Renato Golinfe4716f2013-05-28 10:32:55 +000017If you're looking for the document on how to test the release candidates and
Renato Golin988005a2013-05-28 11:28:37 +000018create the binary packages, please refer to the :doc:`ReleaseProcess` instead.
Renato Golinfe4716f2013-05-28 10:32:55 +000019
Dmitri Gribenko69c02392012-12-07 16:42:48 +000020.. _timeline:
21
22Release Timeline
23================
24
25LLVM is released on a time based schedule --- roughly every 6 months. We do
26not normally have dot releases because of the nature of LLVM's incremental
27development philosophy. That said, the only thing preventing dot releases for
28critical bug fixes from happening is a lack of resources --- testers,
29machines, time, etc. And, because of the high quality we desire for LLVM
30releases, we cannot allow for a truncated form of release qualification.
31
32The release process is roughly as follows:
33
34* Set code freeze and branch creation date for 6 months after last code freeze
35 date. Announce release schedule to the LLVM community and update the website.
36
37* Create release branch and begin release process.
38
39* Send out release candidate sources for first round of testing. Testing lasts
40 7-10 days. During the first round of testing, any regressions found should be
41 fixed. Patches are merged from mainline into the release branch. Also, all
42 features need to be completed during this time. Any features not completed at
43 the end of the first round of testing will be removed or disabled for the
44 release.
45
46* Generate and send out the second release candidate sources. Only *critial*
47 bugs found during this testing phase will be fixed. Any bugs introduced by
48 merged patches will be fixed. If so a third round of testing is needed.
49
50* The release notes are updated.
51
52* Finally, release!
53
Dmitri Gribenko69c02392012-12-07 16:42:48 +000054Release Process
55===============
56
Dmitri Gribenko76d182f2012-12-09 15:29:56 +000057.. contents::
58 :local:
Dmitri Gribenko69c02392012-12-07 16:42:48 +000059
60Release Administrative Tasks
61----------------------------
62
63This section describes a few administrative tasks that need to be done for the
64release process to begin. Specifically, it involves:
65
66* Creating the release branch,
67
68* Setting version numbers, and
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000069
Dmitri Gribenko69c02392012-12-07 16:42:48 +000070* Tagging release candidates for the release team to begin testing.
71
Dmitri Gribenko69c02392012-12-07 16:42:48 +000072Create Release Branch
73^^^^^^^^^^^^^^^^^^^^^
74
75Branch the Subversion trunk using the following procedure:
76
77#. Remind developers that the release branching is imminent and to refrain from
78 committing patches that might break the build. E.g., new features, large
79 patches for works in progress, an overhaul of the type system, an exciting
80 new TableGen feature, etc.
81
82#. Verify that the current Subversion trunk is in decent shape by
83 examining nightly tester and buildbot results.
84
85#. Create the release branch for ``llvm``, ``clang``, the ``test-suite``, and
86 ``dragonegg`` from the last known good revision. The branch's name is
87 ``release_XY``, where ``X`` is the major and ``Y`` the minor release
88 numbers. The branches should be created using the following commands:
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000089
Dmitri Gribenko69c02392012-12-07 16:42:48 +000090 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +000091
Dmitri Gribenko69c02392012-12-07 16:42:48 +000092 $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \
93 https://llvm.org/svn/llvm-project/llvm/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/cfe/trunk \
96 https://llvm.org/svn/llvm-project/cfe/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/dragonegg/trunk \
99 https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000100
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000101 $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \
102 https://llvm.org/svn/llvm-project/test-suite/branches/release_XY
103
104#. Advise developers that they may now check their patches into the Subversion
105 tree again.
106
107#. The Release Manager should switch to the release branch, because all changes
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000108 to the release will now be done in the branch. The easiest way to do this is
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000109 to grab a working copy using the following commands:
110
111 ::
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000112
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000113 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000114
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000115 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-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/dragonegg/branches/release_XY dragonegg-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/test-suite/branches/release_XY test-suite-X.Y
120
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000121Update LLVM Version
122^^^^^^^^^^^^^^^^^^^
123
124After creating the LLVM release branch, update the release branches'
125``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
126Update it on mainline as well to be the next version ('``X.Y+1svn``').
127Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
128
129In addition, the version numbers of all the Bugzilla components must be updated
130for the next release.
131
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000132Build the LLVM Release Candidates
133^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134
135Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM
136``test-suite`` by tagging the branch with the respective release candidate
137number. For instance, to create **Release Candidate 1** you would issue the
138following commands:
139
140::
141
142 $ svn mkdir https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY
143 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
144 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000145
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000146 $ svn mkdir https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY
147 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
148 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1
149
150 $ svn mkdir https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY
151 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
152 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1
153
154 $ svn mkdir https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY
155 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
156 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1
157
158Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps
159a permanent copy of the release candidate around for people to export and build
160as they wish. The final released sources will be tagged in the ``RELEASE_XY``
Dmitri Gribenko76d182f2012-12-09 15:29:56 +0000161directory as ``Final`` (c.f. :ref:`tag`).
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000162
163The Release Manager may supply pre-packaged source tarballs for users. This can
164be done with the following commands:
165
166::
167
168 $ svn export https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 llvm-X.Yrc1
169 $ svn export https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 clang-X.Yrc1
170 $ svn export https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 dragonegg-X.Yrc1
171 $ 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 +0000172
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000173 $ tar -cvf - llvm-X.Yrc1 | gzip > llvm-X.Yrc1.src.tar.gz
174 $ tar -cvf - clang-X.Yrc1 | gzip > clang-X.Yrc1.src.tar.gz
175 $ tar -cvf - dragonegg-X.Yrc1 | gzip > dragonegg-X.Yrc1.src.tar.gz
176 $ tar -cvf - llvm-test-X.Yrc1 | gzip > llvm-test-X.Yrc1.src.tar.gz
177
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000178Building the Release
179--------------------
180
181The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of
182errors and warnings in Debug, Release+Asserts, and Release builds. If all
183builds are clean, then the release passes Build Qualification.
184
185The ``make`` options for building the different modes:
186
187+-----------------+---------------------------------------------+
188| Mode | Options |
189+=================+=============================================+
190| Debug | ``ENABLE_OPTIMIZED=0`` |
191+-----------------+---------------------------------------------+
192| Release+Asserts | ``ENABLE_OPTIMIZED=1`` |
193+-----------------+---------------------------------------------+
194| Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` |
195+-----------------+---------------------------------------------+
196
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000197Build LLVM
198^^^^^^^^^^
199
200Build ``Debug``, ``Release+Asserts``, and ``Release`` versions
201of ``llvm`` on all supported platforms. Directions to build ``llvm``
Sean Silvaa7aec402013-01-11 02:28:08 +0000202are :doc:`here <GettingStarted>`.
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000203
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000204Build Clang Binary Distribution
205^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
206
207Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release)
208requires performing the following steps for each supported platform:
209
210#. Build clang according to the directions `here
211 <http://clang.llvm.org/get_started.html>`__.
212
213#. Build both a Debug and Release version of clang. The binary will be the
214 Release build.
215
216#. Package ``clang`` (details to follow).
217
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000218Target Specific Build Details
219^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220
221The table below specifies which compilers are used for each Arch/OS combination
222when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``.
223
224+--------------+---------------+----------------------+
225| Architecture | OS | compiler |
226+==============+===============+======================+
227| x86-32 | Mac OS 10.5 | gcc 4.0.1 |
228+--------------+---------------+----------------------+
229| x86-32 | Linux | gcc 4.2.X, gcc 4.3.X |
230+--------------+---------------+----------------------+
231| x86-32 | FreeBSD | gcc 4.2.X |
232+--------------+---------------+----------------------+
233| x86-32 | mingw | gcc 3.4.5 |
234+--------------+---------------+----------------------+
235| x86-64 | Mac OS 10.5 | gcc 4.0.1 |
236+--------------+---------------+----------------------+
237| x86-64 | Linux | gcc 4.2.X, gcc 4.3.X |
238+--------------+---------------+----------------------+
239| x86-64 | FreeBSD | gcc 4.2.X |
240+--------------+---------------+----------------------+
241
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000242Release Qualification Criteria
243------------------------------
244
245A release is qualified when it has no regressions from the previous release (or
246baseline). Regressions are related to correctness first and performance second.
247(We may tolerate some minor performance regressions if they are deemed
248necessary for the general quality of the compiler.)
249
250**Regressions are new failures in the set of tests that are used to qualify
251each product and only include things on the list. Every release will have
252some bugs in it. It is the reality of developing a complex piece of
253software. We need a very concrete and definitive release criteria that
254ensures we have monotonically improving quality on some metric. The metric we
255use is described below. This doesn't mean that we don't care about other
256criteria, but these are the criteria which we found to be most important and
257which must be satisfied before a release can go out.**
258
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000259Qualify LLVM
260^^^^^^^^^^^^
261
262LLVM is qualified when it has a clean test run without a front-end. And it has
263no regressions when using either ``clang`` or ``dragonegg`` with the
264``test-suite`` from the previous release.
265
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000266Qualify Clang
267^^^^^^^^^^^^^
268
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000269``Clang`` is qualified when front-end specific tests in the ``llvm`` regression
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000270test suite all pass, clang's own test suite passes cleanly, and there are no
271regressions in the ``test-suite``.
272
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000273Specific Target Qualification Details
274^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
275
276+--------------+-------------+----------------+-----------------------------+
277| Architecture | OS | clang baseline | tests |
278+==============+=============+================+=============================+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000279| x86-32 | Linux | last release | llvm regression tests, |
280| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000281| | | | test-suite (including spec) |
282+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000283| x86-32 | FreeBSD | last release | llvm regression tests, |
284| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000285| | | | test-suite |
286+--------------+-------------+----------------+-----------------------------+
287| x86-32 | mingw | none | QT |
288+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000289| x86-64 | Mac OS 10.X | last release | llvm regression tests, |
290| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000291| | | | test-suite (including spec) |
292+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000293| x86-64 | Linux | last release | llvm regression tests, |
294| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000295| | | | test-suite (including spec) |
296+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko55c6f0c2013-01-18 19:27:43 +0000297| x86-64 | FreeBSD | last release | llvm regression tests, |
298| | | | clang regression tests, |
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000299| | | | test-suite |
300+--------------+-------------+----------------+-----------------------------+
301
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000302Community Testing
303-----------------
304
305Once all testing has been completed and appropriate bugs filed, the release
306candidate tarballs are put on the website and the LLVM community is notified.
307Ask that all LLVM developers test the release in 2 ways:
308
309#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
310 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
311 TEST=nightly report``).
312
313#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
314 everything. Run ``make check`` and the full LLVM test suite (``make
315 TEST=nightly report``).
316
317Ask LLVM developers to submit the test suite report and ``make check`` results
318to the list. Verify that there are no regressions from the previous release.
319The results are not used to qualify a release, but to spot other potential
320problems. For unsupported targets, verify that ``make check`` is at least
321clean.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000322
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000323During the first round of testing, all regressions must be fixed before the
324second release candidate is tagged.
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000325
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000326If this is the second round of testing, the testing is only to ensure that bug
327fixes previously merged in have not created new major problems. *This is not
328the time to solve additional and unrelated bugs!* If no patches are merged in,
329the release is determined to be ready and the release manager may move onto the
330next stage.
331
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000332Release Patch Rules
333-------------------
334
335Below are the rules regarding patching the release branch:
336
337#. Patches applied to the release branch may only be applied by the release
338 manager.
339
340#. During the first round of testing, patches that fix regressions or that are
341 small and relatively risk free (verified by the appropriate code owner) are
342 applied to the branch. Code owners are asked to be very conservative in
343 approving patches for the branch. We reserve the right to reject any patch
344 that does not fix a regression as previously defined.
345
346#. During the remaining rounds of testing, only patches that fix critical
347 regressions may be applied.
348
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000349Release Final Tasks
350-------------------
351
352The final stages of the release process involves tagging the "final" release
353branch, updating documentation that refers to the release, and updating the
354demo page.
355
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000356Update Documentation
357^^^^^^^^^^^^^^^^^^^^
358
359Review the documentation and ensure that it is up to date. The "Release Notes"
360must be updated to reflect new features, bug fixes, new known issues, and
361changes in the list of supported platforms. The "Getting Started Guide" should
362be updated to reflect the new release version number tag available from
363Subversion and changes in basic system requirements. Merge both changes from
364mainline into the release branch.
365
366.. _tag:
367
368Tag the LLVM Final Release
369^^^^^^^^^^^^^^^^^^^^^^^^^^
370
371Tag the final release sources using the following procedure:
372
373::
374
375 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
376 https://llvm.org/svn/llvm-project/llvm/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/cfe/branches/release_XY \
379 https://llvm.org/svn/llvm-project/cfe/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/dragonegg/branches/release_XY \
382 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
Dmitri Gribenko6297bfa2012-12-09 15:33:26 +0000383
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000384 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
385 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final
386
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000387Update the LLVM Demo Page
388-------------------------
389
390The LLVM demo page must be updated to use the new release. This consists of
391using the new ``clang`` binary and building LLVM.
392
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000393Update the LLVM Website
394^^^^^^^^^^^^^^^^^^^^^^^
395
396The website must be updated before the release announcement is sent out. Here
397is what to do:
398
399#. Check out the ``www`` module from Subversion.
400
401#. Create a new subdirectory ``X.Y`` in the releases directory.
402
403#. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
404 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
405
406#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
407 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
408
409#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
410 from previous release).
411
412#. Update the ``releases/download.html`` file with the new release.
413
414#. Update the ``releases/index.html`` with the new release and link to release
415 documentation.
416
417#. Finally, update the main page (``index.html`` and sidebar) to point to the
418 new release and release announcement. Make sure this all gets committed back
419 into Subversion.
420
Dmitri Gribenko69c02392012-12-07 16:42:48 +0000421Announce the Release
422^^^^^^^^^^^^^^^^^^^^
423
424Have Chris send out the release announcement when everything is finished.
425