blob: 2a8b93548714035614f2a79b787035de10187c93 [file] [log] [blame] [view]
andybons3322f762015-08-24 21:37:091# Updating clang
2
Nico Weber4071eca2018-09-25 12:29:143We distribute prebuilt packages of LLVM binaries, including clang and lld, that
4all developers and bots pull at `gclient runhooks` time. These binaries are
5just regular LLVM binaries built at a fixed upstream revision. This document
6describes how to build a package at a newer revision and update Chromium to it.
7An archive of all packages built so far is at https://is.gd/chromeclang
8
Nico Weberf218afd2018-09-20 19:11:2191. Check that https://ci.chromium.org/p/chromium/g/chromium.clang/console
10 looks reasonably green.
nodir06cbaa02015-08-25 17:15:24111. Sync your Chromium tree to the latest revision to pick up any plugin
Arthur Eubanksf055cc52020-06-10 02:21:3712 changes.
131. 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 Weber916702902020-01-30 19:25:47201. Run an exhaustive set of try jobs to test the new compiler. The CL
Arthur Eubanksf055cc52020-06-10 02:21:3721 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).
241. Commit the roll CL from the previous step.
nodir06cbaa02015-08-25 17:15:24251. The bots will now pull the prebuilt binary, and goma will have a matching
26 binary, too.
Nico Weber4071eca2018-09-25 12:29:1427
28## Adding files to the clang package
29
30The clang package is downloaded unconditionally by all bots and devs. It's
31called "clang" for historical reasons, but nowadays also contains other
32mission-critical toolchain pieces besides clang.
33
34We try to limit the contents of the clang package. They should meet these
35criteria:
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
41If you want to add something to the clang package that doesn't (yet?) meet
42these criteria, you can make package.py upload it to a separate zip file
Hans Wennborg8ee64a12019-11-05 17:31:3043and then download it on an opt-in basis by using update.py's --package option.
Nico Weber4071eca2018-09-25 12:29:1444
45If you're adding a new feature that you expect will meet the inclusion criteria
46eventually but doesn't yet, start by having your things in a separate zip
47and move it to the main zip once the criteria are met.