1 =================================
2 How To Release LLVM To The Public
3 =================================
12 This document contains information about successfully releasing LLVM ---
13 including subprojects: e.g., ``clang`` and ``dragonegg`` --- to the public. It
14 is the Release Manager's responsibility to ensure that a high quality build of
22 LLVM is released on a time based schedule --- roughly every 6 months. We do
23 not normally have dot releases because of the nature of LLVM's incremental
24 development philosophy. That said, the only thing preventing dot releases for
25 critical bug fixes from happening is a lack of resources --- testers,
26 machines, time, etc. And, because of the high quality we desire for LLVM
27 releases, we cannot allow for a truncated form of release qualification.
29 The release process is roughly as follows:
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.
34 * Create release branch and begin release process.
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
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.
47 * The release notes are updated.
57 Release Administrative Tasks
58 ----------------------------
60 This section describes a few administrative tasks that need to be done for the
61 release process to begin. Specifically, it involves:
63 * Creating the release branch,
65 * Setting version numbers, and
67 * Tagging release candidates for the release team to begin testing.
72 Branch the Subversion trunk using the following procedure:
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.
79 #. Verify that the current Subversion trunk is in decent shape by
80 examining nightly tester and buildbot results.
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:
89 $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \
90 https://llvm.org/svn/llvm-project/llvm/branches/release_XY
92 $ svn copy https://llvm.org/svn/llvm-project/cfe/trunk \
93 https://llvm.org/svn/llvm-project/cfe/branches/release_XY
95 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/trunk \
96 https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY
98 $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \
99 https://llvm.org/svn/llvm-project/test-suite/branches/release_XY
101 #. Advise developers that they may now check their patches into the Subversion
104 #. The Release Manager should switch to the release branch, because all changes
105 to the release will now be done in the branch. The easiest way to do this is
106 to grab a working copy using the following commands:
110 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
112 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
114 $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y
116 $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
121 After creating the LLVM release branch, update the release branches'
122 ``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
123 Update it on mainline as well to be the next version ('``X.Y+1svn``').
124 Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
126 In addition, the version numbers of all the Bugzilla components must be updated
127 for the next release.
129 Build the LLVM Release Candidates
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM
133 ``test-suite`` by tagging the branch with the respective release candidate
134 number. For instance, to create **Release Candidate 1** you would issue the
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
143 $ 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
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
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
155 Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps
156 a permanent copy of the release candidate around for people to export and build
157 as they wish. The final released sources will be tagged in the ``RELEASE_XY``
158 directory as ``Final`` (c.f. :ref:`tag`).
160 The Release Manager may supply pre-packaged source tarballs for users. This can
161 be done with the following commands:
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
170 $ 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
178 The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of
179 errors and warnings in Debug, Release+Asserts, and Release builds. If all
180 builds are clean, then the release passes Build Qualification.
182 The ``make`` options for building the different modes:
184 +-----------------+---------------------------------------------+
186 +=================+=============================================+
187 | Debug | ``ENABLE_OPTIMIZED=0`` |
188 +-----------------+---------------------------------------------+
189 | Release+Asserts | ``ENABLE_OPTIMIZED=1`` |
190 +-----------------+---------------------------------------------+
191 | Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` |
192 +-----------------+---------------------------------------------+
197 Build ``Debug``, ``Release+Asserts``, and ``Release`` versions
198 of ``llvm`` on all supported platforms. Directions to build ``llvm``
199 are :doc:`here <GettingStarted>`.
201 Build Clang Binary Distribution
202 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release)
205 requires performing the following steps for each supported platform:
207 #. Build clang according to the directions `here
208 <http://clang.llvm.org/get_started.html>`__.
210 #. Build both a Debug and Release version of clang. The binary will be the
213 #. Package ``clang`` (details to follow).
215 Target Specific Build Details
216 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218 The table below specifies which compilers are used for each Arch/OS combination
219 when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``.
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 +--------------+---------------+----------------------+
239 Release Qualification Criteria
240 ------------------------------
242 A release is qualified when it has no regressions from the previous release (or
243 baseline). Regressions are related to correctness first and performance second.
244 (We may tolerate some minor performance regressions if they are deemed
245 necessary for the general quality of the compiler.)
247 **Regressions are new failures in the set of tests that are used to qualify
248 each product and only include things on the list. Every release will have
249 some bugs in it. It is the reality of developing a complex piece of
250 software. We need a very concrete and definitive release criteria that
251 ensures we have monotonically improving quality on some metric. The metric we
252 use is described below. This doesn't mean that we don't care about other
253 criteria, but these are the criteria which we found to be most important and
254 which must be satisfied before a release can go out.**
259 LLVM is qualified when it has a clean test run without a front-end. And it has
260 no regressions when using either ``clang`` or ``dragonegg`` with the
261 ``test-suite`` from the previous release.
266 ``Clang`` is qualified when front-end specific tests in the ``llvm`` regression
267 test suite all pass, clang's own test suite passes cleanly, and there are no
268 regressions in the ``test-suite``.
270 Specific Target Qualification Details
271 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
273 +--------------+-------------+----------------+-----------------------------+
274 | Architecture | OS | clang baseline | tests |
275 +==============+=============+================+=============================+
276 | x86-32 | Linux | last release | llvm regression tests, |
277 | | | | clang regression tests, |
278 | | | | test-suite (including spec) |
279 +--------------+-------------+----------------+-----------------------------+
280 | x86-32 | FreeBSD | last release | llvm regression tests, |
281 | | | | clang regression tests, |
283 +--------------+-------------+----------------+-----------------------------+
284 | x86-32 | mingw | none | QT |
285 +--------------+-------------+----------------+-----------------------------+
286 | x86-64 | Mac OS 10.X | last release | llvm regression tests, |
287 | | | | clang regression tests, |
288 | | | | test-suite (including spec) |
289 +--------------+-------------+----------------+-----------------------------+
290 | x86-64 | Linux | last release | llvm regression tests, |
291 | | | | clang regression tests, |
292 | | | | test-suite (including spec) |
293 +--------------+-------------+----------------+-----------------------------+
294 | x86-64 | FreeBSD | last release | llvm regression tests, |
295 | | | | clang regression tests, |
297 +--------------+-------------+----------------+-----------------------------+
302 Once all testing has been completed and appropriate bugs filed, the release
303 candidate tarballs are put on the website and the LLVM community is notified.
304 Ask that all LLVM developers test the release in 2 ways:
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``).
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``).
314 Ask LLVM developers to submit the test suite report and ``make check`` results
315 to the list. Verify that there are no regressions from the previous release.
316 The results are not used to qualify a release, but to spot other potential
317 problems. For unsupported targets, verify that ``make check`` is at least
320 During the first round of testing, all regressions must be fixed before the
321 second release candidate is tagged.
323 If this is the second round of testing, the testing is only to ensure that bug
324 fixes previously merged in have not created new major problems. *This is not
325 the time to solve additional and unrelated bugs!* If no patches are merged in,
326 the release is determined to be ready and the release manager may move onto the
332 Below are the rules regarding patching the release branch:
334 #. Patches applied to the release branch may only be applied by the release
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.
343 #. During the remaining rounds of testing, only patches that fix critical
344 regressions may be applied.
349 The final stages of the release process involves tagging the "final" release
350 branch, updating documentation that refers to the release, and updating the
356 Review the documentation and ensure that it is up to date. The "Release Notes"
357 must be updated to reflect new features, bug fixes, new known issues, and
358 changes in the list of supported platforms. The "Getting Started Guide" should
359 be updated to reflect the new release version number tag available from
360 Subversion and changes in basic system requirements. Merge both changes from
361 mainline into the release branch.
365 Tag the LLVM Final Release
366 ^^^^^^^^^^^^^^^^^^^^^^^^^^
368 Tag the final release sources using the following procedure:
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
375 $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \
376 https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final
378 $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \
379 https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final
381 $ 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
384 Update the LLVM Demo Page
385 -------------------------
387 The LLVM demo page must be updated to use the new release. This consists of
388 using the new ``clang`` binary and building LLVM.
390 Update the LLVM Website
391 ^^^^^^^^^^^^^^^^^^^^^^^
393 The website must be updated before the release announcement is sent out. Here
396 #. Check out the ``www`` module from Subversion.
398 #. Create a new subdirectory ``X.Y`` in the releases directory.
400 #. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``,
401 ``dragonegg`` source, and ``dragonegg`` binaries in this new directory.
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``.
406 #. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
407 from previous release).
409 #. Update the ``releases/download.html`` file with the new release.
411 #. Update the ``releases/index.html`` with the new release and link to release
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
421 Have Chris send out the release announcement when everything is finished.