1 =================================
2 How To Release LLVM To The Public
3 =================================
8 .. sectionauthor:: Tanya Lattner <tonic@nondot.org>,
9 Reid Spencer <rspencer@x10sys.com>,
10 John Criswell <criswell@cs.uiuc.edu> and
11 Bill Wendling <wendling@apple.com>
16 This document contains information about successfully releasing LLVM ---
17 including subprojects: e.g., ``clang`` and ``dragonegg`` --- to the public. It
18 is the Release Manager's responsibility to ensure that a high quality build of
26 LLVM is released on a time based schedule --- roughly every 6 months. We do
27 not normally have dot releases because of the nature of LLVM's incremental
28 development philosophy. That said, the only thing preventing dot releases for
29 critical bug fixes from happening is a lack of resources --- testers,
30 machines, time, etc. And, because of the high quality we desire for LLVM
31 releases, we cannot allow for a truncated form of release qualification.
33 The release process is roughly as follows:
35 * Set code freeze and branch creation date for 6 months after last code freeze
36 date. Announce release schedule to the LLVM community and update the website.
38 * Create release branch and begin release process.
40 * Send out release candidate sources for first round of testing. Testing lasts
41 7-10 days. During the first round of testing, any regressions found should be
42 fixed. Patches are merged from mainline into the release branch. Also, all
43 features need to be completed during this time. Any features not completed at
44 the end of the first round of testing will be removed or disabled for the
47 * Generate and send out the second release candidate sources. Only *critial*
48 bugs found during this testing phase will be fixed. Any bugs introduced by
49 merged patches will be fixed. If so a third round of testing is needed.
51 * The release notes are updated.
60 #. :ref:`Release Administrative Tasks <release-admin>`
62 #. :ref:`Create Release Branch <branch>`
64 #. :ref:`Update Version Numbers <verchanges>`
66 #. :ref:`Building the Release <release-build>`
68 #. :ref:`Build the LLVM Source Distribution <dist>`
70 #. :ref:`Build LLVM <build>`
72 #. :ref:`Build the Clang Binary Distribution <clangbin>`
74 #. :ref:`Target Specific Build Details <target-build>`
76 #. :ref:`Release Qualification Criteria <release-qualify>`
78 #. :ref:`Qualify LLVM <llvm-qualify>`
80 #. :ref:`Qualify Clang <clang-qualify>`
82 #. :ref:`Specific Target Qualification Details <target>`
84 #. :ref:`Community Testing <commTest>`
86 #. :ref:`Release Patch Rules <release-patch>`
88 #. :ref:`Release final tasks <release-final>`
90 #. :ref:`Update Documentation <updocs>`
92 #. :ref:`Tag the LLVM Final Release <tag>`
94 #. :ref:`Update the LLVM Demo Page <updemo>`
96 #. :ref:`Update the LLVM Website <webupdates>`
98 #. :ref:`Announce the Release <announce>`
102 Release Administrative Tasks
103 ----------------------------
105 This section describes a few administrative tasks that need to be done for the
106 release process to begin. Specifically, it involves:
108 * Creating the release branch,
110 * Setting version numbers, and
112 * Tagging release candidates for the release team to begin testing.
116 Create Release Branch
117 ^^^^^^^^^^^^^^^^^^^^^
119 Branch the Subversion trunk using the following procedure:
121 #. Remind developers that the release branching is imminent and to refrain from
122 committing patches that might break the build. E.g., new features, large
123 patches for works in progress, an overhaul of the type system, an exciting
124 new TableGen feature, etc.
126 #. Verify that the current Subversion trunk is in decent shape by
127 examining nightly tester and buildbot results.
129 #. Create the release branch for ``llvm``, ``clang``, the ``test-suite``, and
130 ``dragonegg`` from the last known good revision. The branch's name is
131 ``release_XY``, where ``X`` is the major and ``Y`` the minor release
132 numbers. The branches should be created using the following commands:
136 $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \
137 https://llvm.org/svn/llvm-project/llvm/branches/release_XY
139 $ svn copy https://llvm.org/svn/llvm-project/cfe/trunk \
140 https://llvm.org/svn/llvm-project/cfe/branches/release_XY
142 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/trunk \
143 https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY
145 $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \
146 https://llvm.org/svn/llvm-project/test-suite/branches/release_XY
148 #. Advise developers that they may now check their patches into the Subversion
151 #. The Release Manager should switch to the release branch, because all changes
152 to the release will now be done in the branch. The easiest way to do this is
153 to grab a working copy using the following commands:
157 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
159 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
161 $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y
163 $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
170 After creating the LLVM release branch, update the release branches'
171 ``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
172 Update it on mainline as well to be the next version ('``X.Y+1svn``').
173 Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
175 In addition, the version numbers of all the Bugzilla components must be updated
176 for the next release.
180 Build the LLVM Release Candidates
181 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183 Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM
184 ``test-suite`` by tagging the branch with the respective release candidate
185 number. For instance, to create **Release Candidate 1** you would issue the
190 $ svn mkdir https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY
191 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
192 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1
194 $ svn mkdir https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY
195 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
196 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1
198 $ svn mkdir https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY
199 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
200 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1
202 $ svn mkdir https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY
203 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
204 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1
206 Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps
207 a permanent copy of the release candidate around for people to export and build
208 as they wish. The final released sources will be tagged in the ``RELEASE_XY``
209 directory as ``Final`` (c.f. :ref:`Tag the LLVM Final Release <tag>`).
211 The Release Manager may supply pre-packaged source tarballs for users. This can
212 be done with the following commands:
216 $ svn export https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 llvm-X.Yrc1
217 $ svn export https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 clang-X.Yrc1
218 $ svn export https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 dragonegg-X.Yrc1
219 $ svn export https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1 llvm-test-X.Yrc1
221 $ tar -cvf - llvm-X.Yrc1 | gzip > llvm-X.Yrc1.src.tar.gz
222 $ tar -cvf - clang-X.Yrc1 | gzip > clang-X.Yrc1.src.tar.gz
223 $ tar -cvf - dragonegg-X.Yrc1 | gzip > dragonegg-X.Yrc1.src.tar.gz
224 $ tar -cvf - llvm-test-X.Yrc1 | gzip > llvm-test-X.Yrc1.src.tar.gz
231 The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of
232 errors and warnings in Debug, Release+Asserts, and Release builds. If all
233 builds are clean, then the release passes Build Qualification.
235 The ``make`` options for building the different modes:
237 +-----------------+---------------------------------------------+
239 +=================+=============================================+
240 | Debug | ``ENABLE_OPTIMIZED=0`` |
241 +-----------------+---------------------------------------------+
242 | Release+Asserts | ``ENABLE_OPTIMIZED=1`` |
243 +-----------------+---------------------------------------------+
244 | Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` |
245 +-----------------+---------------------------------------------+
253 Build ``Debug``, ``Release+Asserts``, and ``Release`` versions
254 of ``llvm`` on all supported platforms. Directions to build ``llvm``
255 are :ref:`here <getting_started>`.
259 Build Clang Binary Distribution
260 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262 Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release)
263 requires performing the following steps for each supported platform:
265 #. Build clang according to the directions `here
266 <http://clang.llvm.org/get_started.html>`__.
268 #. Build both a Debug and Release version of clang. The binary will be the
271 #. Package ``clang`` (details to follow).
275 Target Specific Build Details
276 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 The table below specifies which compilers are used for each Arch/OS combination
279 when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``.
281 +--------------+---------------+----------------------+
282 | Architecture | OS | compiler |
283 +==============+===============+======================+
284 | x86-32 | Mac OS 10.5 | gcc 4.0.1 |
285 +--------------+---------------+----------------------+
286 | x86-32 | Linux | gcc 4.2.X, gcc 4.3.X |
287 +--------------+---------------+----------------------+
288 | x86-32 | FreeBSD | gcc 4.2.X |
289 +--------------+---------------+----------------------+
290 | x86-32 | mingw | gcc 3.4.5 |
291 +--------------+---------------+----------------------+
292 | x86-64 | Mac OS 10.5 | gcc 4.0.1 |
293 +--------------+---------------+----------------------+
294 | x86-64 | Linux | gcc 4.2.X, gcc 4.3.X |
295 +--------------+---------------+----------------------+
296 | x86-64 | FreeBSD | gcc 4.2.X |
297 +--------------+---------------+----------------------+
301 Release Qualification Criteria
302 ------------------------------
304 A release is qualified when it has no regressions from the previous release (or
305 baseline). Regressions are related to correctness first and performance second.
306 (We may tolerate some minor performance regressions if they are deemed
307 necessary for the general quality of the compiler.)
309 **Regressions are new failures in the set of tests that are used to qualify
310 each product and only include things on the list. Every release will have
311 some bugs in it. It is the reality of developing a complex piece of
312 software. We need a very concrete and definitive release criteria that
313 ensures we have monotonically improving quality on some metric. The metric we
314 use is described below. This doesn't mean that we don't care about other
315 criteria, but these are the criteria which we found to be most important and
316 which must be satisfied before a release can go out.**
323 LLVM is qualified when it has a clean test run without a front-end. And it has
324 no regressions when using either ``clang`` or ``dragonegg`` with the
325 ``test-suite`` from the previous release.
332 ``Clang`` is qualified when front-end specific tests in the ``llvm`` dejagnu
333 test suite all pass, clang's own test suite passes cleanly, and there are no
334 regressions in the ``test-suite``.
338 Specific Target Qualification Details
339 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
341 +--------------+-------------+----------------+-----------------------------+
342 | Architecture | OS | clang baseline | tests |
343 +==============+=============+================+=============================+
344 | x86-32 | Linux | last release | llvm dejagnu, |
345 | | | | clang tests, |
346 | | | | test-suite (including spec) |
347 +--------------+-------------+----------------+-----------------------------+
348 | x86-32 | FreeBSD | last release | llvm dejagnu, |
349 | | | | clang tests, |
351 +--------------+-------------+----------------+-----------------------------+
352 | x86-32 | mingw | none | QT |
353 +--------------+-------------+----------------+-----------------------------+
354 | x86-64 | Mac OS 10.X | last release | llvm dejagnu, |
355 | | | | clang tests, |
356 | | | | test-suite (including spec) |
357 +--------------+-------------+----------------+-----------------------------+
358 | x86-64 | Linux | last release | llvm dejagnu, |
359 | | | | clang tests, |
360 | | | | test-suite (including spec) |
361 +--------------+-------------+----------------+-----------------------------+
362 | x86-64 | FreeBSD | last release | llvm dejagnu, |
363 | | | | clang tests, |
365 +--------------+-------------+----------------+-----------------------------+
372 Once all testing has been completed and appropriate bugs filed, the release
373 candidate tarballs are put on the website and the LLVM community is notified.
374 Ask that all LLVM developers test the release in 2 ways:
376 #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
377 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
378 TEST=nightly report``).
380 #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
381 everything. Run ``make check`` and the full LLVM test suite (``make
382 TEST=nightly report``).
384 Ask LLVM developers to submit the test suite report and ``make check`` results
385 to the list. Verify that there are no regressions from the previous release.
386 The results are not used to qualify a release, but to spot other potential
387 problems. For unsupported targets, verify that ``make check`` is at least
390 During the first round of testing, all regressions must be fixed before the
391 second release candidate is tagged.
393 If this is the second round of testing, the testing is only to ensure that bug
394 fixes previously merged in have not created new major problems. *This is not
395 the time to solve additional and unrelated bugs!* If no patches are merged in,
396 the release is determined to be ready and the release manager may move onto the
404 Below are the rules regarding patching the release branch:
406 #. Patches applied to the release branch may only be applied by the release
409 #. During the first round of testing, patches that fix regressions or that are
410 small and relatively risk free (verified by the appropriate code owner) are
411 applied to the branch. Code owners are asked to be very conservative in
412 approving patches for the branch. We reserve the right to reject any patch
413 that does not fix a regression as previously defined.
415 #. During the remaining rounds of testing, only patches that fix critical
416 regressions may be applied.
423 The final stages of the release process involves tagging the "final" release
424 branch, updating documentation that refers to the release, and updating the
432 Review the documentation and ensure that it is up to date. The "Release Notes"
433 must be updated to reflect new features, bug fixes, new known issues, and
434 changes in the list of supported platforms. The "Getting Started Guide" should
435 be updated to reflect the new release version number tag available from
436 Subversion and changes in basic system requirements. Merge both changes from
437 mainline into the release branch.
441 Tag the LLVM Final Release
442 ^^^^^^^^^^^^^^^^^^^^^^^^^^
444 Tag the final release sources using the following procedure:
448 $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \
449 https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/Final
451 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
452 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final
454 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
455 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
457 $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \
458 https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final
462 Update the LLVM Demo Page
463 -------------------------
465 The LLVM demo page must be updated to use the new release. This consists of
466 using the new ``clang`` binary and building LLVM.
470 Update the LLVM Website
471 ^^^^^^^^^^^^^^^^^^^^^^^
473 The website must be updated before the release announcement is sent out. Here
476 #. Check out the ``www`` module from Subversion.
478 #. Create a new subdirectory ``X.Y`` in the releases directory.
480 #. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
481 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
483 #. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
484 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
486 #. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
487 from previous release).
489 #. Update the ``releases/download.html`` file with the new release.
491 #. Update the ``releases/index.html`` with the new release and link to release
494 #. Finally, update the main page (``index.html`` and sidebar) to point to the
495 new release and release announcement. Make sure this all gets committed back
503 Have Chris send out the release announcement when everything is finished.