andybons | 3322f76 | 2015-08-24 21:37:09 | [diff] [blame] | 1 | # Updating clang |
| 2 | |
Nico Weber | 4071eca | 2018-09-25 12:29:14 | [diff] [blame] | 3 | We distribute prebuilt packages of LLVM binaries, including clang and lld, that |
| 4 | all developers and bots pull at `gclient runhooks` time. These binaries are |
| 5 | just regular LLVM binaries built at a fixed upstream revision. This document |
| 6 | describes how to build a package at a newer revision and update Chromium to it. |
| 7 | An archive of all packages built so far is at https://is.gd/chromeclang |
| 8 | |
Nico Weber | f218afd | 2018-09-20 19:11:21 | [diff] [blame] | 9 | 1. Check that https://ci.chromium.org/p/chromium/g/chromium.clang/console |
| 10 | looks reasonably green. |
nodir | 06cbaa0 | 2015-08-25 17:15:24 | [diff] [blame] | 11 | 1. Sync your Chromium tree to the latest revision to pick up any plugin |
Arthur Eubanks | f055cc5 | 2020-06-10 02:21:37 | [diff] [blame^] | 12 | changes. |
| 13 | 1. Run go/chrome-push-clang-to-goma. This takes a recent dry run CL to update |
| 14 | clang, and if the trybots were successful it will copy the binaries from |
| 15 | the staging bucket to the production one. Writing to this bucket requires |
| 16 | special permissions. File a bug at g.co/bugatrooper if you don't have these |
| 17 | already (e.g., https://crbug.com/1034081). Then it will push the packages |
| 18 | to goma. If you do not have the necessary credentials to do the upload, ask |
| 19 | [email protected] to find someone who does. |
Nico Weber | 91670290 | 2020-01-30 19:25:47 | [diff] [blame] | 20 | 1. Run an exhaustive set of try jobs to test the new compiler. The CL |
Arthur Eubanks | f055cc5 | 2020-06-10 02:21:37 | [diff] [blame^] | 21 | description created previously by upload_revision.py includes |
| 22 | `Cq-Include-Trybots:` lines for all needed bots, so it's sufficient to just |
| 23 | run `git cl try` (or hit "CQ DRY RUN" on gerrit). |
| 24 | 1. Commit the roll CL from the previous step. |
nodir | 06cbaa0 | 2015-08-25 17:15:24 | [diff] [blame] | 25 | 1. The bots will now pull the prebuilt binary, and goma will have a matching |
| 26 | binary, too. |
Nico Weber | 4071eca | 2018-09-25 12:29:14 | [diff] [blame] | 27 | |
| 28 | ## Adding files to the clang package |
| 29 | |
| 30 | The clang package is downloaded unconditionally by all bots and devs. It's |
| 31 | called "clang" for historical reasons, but nowadays also contains other |
| 32 | mission-critical toolchain pieces besides clang. |
| 33 | |
| 34 | We try to limit the contents of the clang package. They should meet these |
| 35 | criteria: |
| 36 | |
| 37 | - things that are used by most developers use most of the time (e.g. a |
| 38 | compiler, a linker, sanitizer runtimes) |
| 39 | - things needed for doing official builds |
| 40 | |
| 41 | If you want to add something to the clang package that doesn't (yet?) meet |
| 42 | these criteria, you can make package.py upload it to a separate zip file |
Hans Wennborg | 8ee64a1 | 2019-11-05 17:31:30 | [diff] [blame] | 43 | and then download it on an opt-in basis by using update.py's --package option. |
Nico Weber | 4071eca | 2018-09-25 12:29:14 | [diff] [blame] | 44 | |
| 45 | If you're adding a new feature that you expect will meet the inclusion criteria |
| 46 | eventually but doesn't yet, start by having your things in a separate zip |
| 47 | and move it to the main zip once the criteria are met. |