blob: 6194fdfc8645c992a9499dbcec6185ba038b8aa4 [file] [log] [blame]
Dmitri Gribenko7a936682012-12-07 16:42:48 +00001=================================
2How To Release LLVM To The Public
3=================================
4
5.. contents::
6 :local:
Dmitri Gribenko0c79cd62012-12-09 15:29:56 +00007 :depth: 1
Dmitri Gribenko7a936682012-12-07 16:42:48 +00008
Dmitri Gribenko7a936682012-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 Golinc08f2182013-05-28 10:32:55 +000017If you're looking for the document on how to test the release candidates and
Renato Golin467e2562013-05-28 11:28:37 +000018create the binary packages, please refer to the :doc:`ReleaseProcess` instead.
Renato Golinc08f2182013-05-28 10:32:55 +000019
Dmitri Gribenko7a936682012-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 Gribenko7a936682012-12-07 16:42:48 +000054Release Process
55===============
56
Dmitri Gribenko0c79cd62012-12-09 15:29:56 +000057.. contents::
58 :local:
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +000069
Dmitri Gribenko7a936682012-12-07 16:42:48 +000070* Tagging release candidates for the release team to begin testing.
71
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +000089
Dmitri Gribenko7a936682012-12-07 16:42:48 +000090 ::
Dmitri Gribenko22470852012-12-09 15:33:26 +000091
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +000094
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +000097
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +0000100
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +0000108 to the release will now be done in the branch. The easiest way to do this is
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000109 to grab a working copy using the following commands:
110
111 ::
Dmitri Gribenko22470852012-12-09 15:33:26 +0000112
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000113 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
Dmitri Gribenko22470852012-12-09 15:33:26 +0000114
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000115 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
Dmitri Gribenko22470852012-12-09 15:33:26 +0000116
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000117 $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y
Dmitri Gribenko22470852012-12-09 15:33:26 +0000118
Dmitri Gribenko7a936682012-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 Gribenko7a936682012-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 Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +0000145
Dmitri Gribenko7a936682012-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 Gribenko0c79cd62012-12-09 15:29:56 +0000161directory as ``Final`` (c.f. :ref:`tag`).
Dmitri Gribenko7a936682012-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 Gribenko22470852012-12-09 15:33:26 +0000172
Dmitri Gribenko7a936682012-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 Gribenko7a936682012-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 Gribenko7a936682012-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 Silva92a44892013-01-11 02:28:08 +0000202are :doc:`here <GettingStarted>`.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000203
Dmitri Gribenko7a936682012-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 Gribenko7a936682012-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+--------------+---------------+----------------------+
Renato Golina4ecd462013-12-13 09:39:36 +0000241| ARMv7 | Linux | gcc 4.6.X, gcc 4.7.X |
242+--------------+---------------+----------------------+
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000243
Dmitri Gribenko7a936682012-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 Gribenko7a936682012-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 Gribenko7a936682012-12-07 16:42:48 +0000268Qualify Clang
269^^^^^^^^^^^^^
270
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000271``Clang`` is qualified when front-end specific tests in the ``llvm`` regression
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000272test suite all pass, clang's own test suite passes cleanly, and there are no
273regressions in the ``test-suite``.
274
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000275Specific Target Qualification Details
276^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277
278+--------------+-------------+----------------+-----------------------------+
279| Architecture | OS | clang baseline | tests |
280+==============+=============+================+=============================+
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000281| x86-32 | Linux | last release | llvm regression tests, |
282| | | | clang regression tests, |
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000283| | | | test-suite (including spec) |
284+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000285| x86-32 | FreeBSD | last release | llvm regression tests, |
286| | | | clang regression tests, |
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000287| | | | test-suite |
288+--------------+-------------+----------------+-----------------------------+
289| x86-32 | mingw | none | QT |
290+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000291| x86-64 | Mac OS 10.X | last release | llvm regression tests, |
292| | | | clang regression tests, |
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000293| | | | test-suite (including spec) |
294+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000295| x86-64 | Linux | last release | llvm regression tests, |
296| | | | clang regression tests, |
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000297| | | | test-suite (including spec) |
298+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko09a682a2013-01-18 19:27:43 +0000299| x86-64 | FreeBSD | last release | llvm regression tests, |
300| | | | clang regression tests, |
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000301| | | | test-suite |
302+--------------+-------------+----------------+-----------------------------+
Renato Golina4ecd462013-12-13 09:39:36 +0000303| ARMv7A | Linux | last release | llvm regression tests, |
304| | | | clang regression tests, |
305| | | | test-suite |
306+--------------+-------------+----------------+-----------------------------+
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000307
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000308Community Testing
309-----------------
310
311Once all testing has been completed and appropriate bugs filed, the release
312candidate tarballs are put on the website and the LLVM community is notified.
313Ask that all LLVM developers test the release in 2 ways:
314
315#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
316 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
317 TEST=nightly report``).
318
319#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
320 everything. Run ``make check`` and the full LLVM test suite (``make
321 TEST=nightly report``).
322
323Ask LLVM developers to submit the test suite report and ``make check`` results
324to the list. Verify that there are no regressions from the previous release.
325The results are not used to qualify a release, but to spot other potential
326problems. For unsupported targets, verify that ``make check`` is at least
327clean.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000328
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000329During the first round of testing, all regressions must be fixed before the
330second release candidate is tagged.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000331
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000332If this is the second round of testing, the testing is only to ensure that bug
333fixes previously merged in have not created new major problems. *This is not
334the time to solve additional and unrelated bugs!* If no patches are merged in,
335the release is determined to be ready and the release manager may move onto the
336next stage.
337
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000338Release Patch Rules
339-------------------
340
341Below are the rules regarding patching the release branch:
342
343#. Patches applied to the release branch may only be applied by the release
344 manager.
345
346#. During the first round of testing, patches that fix regressions or that are
347 small and relatively risk free (verified by the appropriate code owner) are
348 applied to the branch. Code owners are asked to be very conservative in
349 approving patches for the branch. We reserve the right to reject any patch
350 that does not fix a regression as previously defined.
351
352#. During the remaining rounds of testing, only patches that fix critical
353 regressions may be applied.
354
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000355Release Final Tasks
356-------------------
357
358The final stages of the release process involves tagging the "final" release
359branch, updating documentation that refers to the release, and updating the
360demo page.
361
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000362Update Documentation
363^^^^^^^^^^^^^^^^^^^^
364
365Review the documentation and ensure that it is up to date. The "Release Notes"
366must be updated to reflect new features, bug fixes, new known issues, and
367changes in the list of supported platforms. The "Getting Started Guide" should
368be updated to reflect the new release version number tag available from
369Subversion and changes in basic system requirements. Merge both changes from
370mainline into the release branch.
371
372.. _tag:
373
374Tag the LLVM Final Release
375^^^^^^^^^^^^^^^^^^^^^^^^^^
376
377Tag the final release sources using the following procedure:
378
379::
380
381 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
382 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/Final
Dmitri Gribenko22470852012-12-09 15:33:26 +0000383
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000384 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
385 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final
Dmitri Gribenko22470852012-12-09 15:33:26 +0000386
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000387 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
388 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
Dmitri Gribenko22470852012-12-09 15:33:26 +0000389
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000390 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
391 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final
392
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000393Update the LLVM Demo Page
394-------------------------
395
396The LLVM demo page must be updated to use the new release. This consists of
397using the new ``clang`` binary and building LLVM.
398
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000399Update the LLVM Website
400^^^^^^^^^^^^^^^^^^^^^^^
401
402The website must be updated before the release announcement is sent out. Here
403is what to do:
404
405#. Check out the ``www`` module from Subversion.
406
407#. Create a new subdirectory ``X.Y`` in the releases directory.
408
409#. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
410 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
411
412#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
413 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
414
415#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
416 from previous release).
417
418#. Update the ``releases/download.html`` file with the new release.
419
420#. Update the ``releases/index.html`` with the new release and link to release
421 documentation.
422
423#. Finally, update the main page (``index.html`` and sidebar) to point to the
424 new release and release announcement. Make sure this all gets committed back
425 into Subversion.
426
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000427Announce the Release
428^^^^^^^^^^^^^^^^^^^^
429
430Have Chris send out the release announcement when everything is finished.
431