blob: 5fc852022e96e6597120c8b932393022a2c0c328 [file] [log] [blame] [view]
andybons3322f762015-08-24 21:37:091# Updating clang
2
Nico Weberf218afd2018-09-20 19:11:2131. Check that https://ci.chromium.org/p/chromium/g/chromium.clang/console
4 looks reasonably green.
nodir06cbaa02015-08-25 17:15:2451. Sync your Chromium tree to the latest revision to pick up any plugin
rnk61e1abc62016-05-04 16:50:216 changes
pccc9228e42017-06-16 10:36:5371. Run `python tools/clang/scripts/upload_revision.py NNNN`
hansc3a66162017-05-12 16:27:078 with the target LLVM SVN revision number. This creates a roll CL on a new
9 branch, uploads it and starts tryjobs that build the compiler binaries into
10 a staging bucket on Google Cloud Storage (GCS).
111. If the clang upload try bots succeed, copy the binaries from the staging
12 bucket to the production one. For example:
13
ingloriond277c61f2017-09-15 23:08:0614 ```shell
15 $ export rev=123456-1
16 $ for x in Linux_x64 Mac Win ; do \
17 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/clang-$rev.tgz \
18 gs://chromium-browser-clang/$x/clang-$rev.tgz ; \
19 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmobjdump-$rev.tgz \
20 gs://chromium-browser-clang/$x/llvmobjdump-$rev.tgz ; \
Mitch Phillipscab458302017-11-20 21:44:3621 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmcfiverify-$rev.tgz \
22 gs://chromium-browser-clang/$x/llvmcfiverify-$rev.tgz ; \
Vlad Tsyrklevicheeab6d72018-08-08 21:06:0223 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/safestack-$rev.tgz \
24 gs://chromium-browser-clang/$x/safestack-$rev.tgz ; \
ingloriond277c61f2017-09-15 23:08:0625 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/translation_unit-$rev.tgz \
26 gs://chromium-browser-clang/$x/translation_unit-$rev.tgz ; \
27 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvm-code-coverage-$rev.tgz \
28 gs://chromium-browser-clang/$x/llvm-code-coverage-$rev.tgz ; \
29 done
Fabrice de Gans-Riberi0f2885832018-08-31 17:55:2530 $ for x in Linux_x64 Mac ; do \
31 gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmstrip-$rev.tgz \
32 gs://chromium-browser-clang/$x/llvmstrip-$rev.tgz ; \
33 done
Nico Weber25162252017-10-09 18:00:5134 $ gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/Mac/lld-$rev.tgz \
Hans Wennborge583b5e2017-10-11 02:40:5535 gs://chromium-browser-clang/Mac/lld-$rev.tgz
ingloriond277c61f2017-09-15 23:08:0636 ```
Hans Wennborge583b5e2017-10-11 02:40:5537
hansc3a66162017-05-12 16:27:07381. Run the goma package update script to push these packages to goma. If you do
39 not have the necessary credentials to do the upload, ask clang@chromium.org
40 to find someone who does
thakis3447dcd2016-05-05 18:17:15411. Run an exhaustive set of try jobs to test the new compiler:
ingloriond277c61f2017-09-15 23:08:0642
43 ```shell
Nico Weberb8603fb2018-05-21 15:42:1044 git cl try &&
Nico Weberb8603fb2018-05-21 15:42:1045 git cl try -m tryserver.blink -b linux_trusty_blink_rel &&
Eric Foo11fc8a172018-08-31 23:14:3346 git cl try -B luci.chromium.try -b ios-device -b mac_chromium_asan_rel_ng \
Nico Weberf218afd2018-09-20 19:11:2147 -b linux_chromium_cfi_rel_ng \
inglorion475c6e192018-06-22 20:42:2548 -b linux_chromium_chromeos_asan_rel_ng -b linux_chromium_msan_rel_ng \
49 -b linux_chromium_chromeos_msan_rel_ng -b linux-chromeos-dbg
ingloriond277c61f2017-09-15 23:08:0650 ```
51
Hans Wennborgad4e8842018-08-01 09:25:13521. Optional: Start Pinpoint perf tryjobs. These are generally too noisy to
53 catch minor regressions pre-commit, but make sure there are no large
54 regressions.
Hans Wennborg62e06b212018-06-18 14:44:4255
56 a. (Log in to store OAuth2 token in the depot_tools cache. Only needs to be
57 run once:)
58
Hans Wennborg62e06b212018-06-18 14:44:4259 $ PYTHONPATH=$(dirname $(which git-cl)) python -c"import auth;auth.OAUTH_CLIENT_ID='62121018386-h08uiaftreu4dr3c4alh3l7mogskvb7i.apps.googleusercontent.com';auth.OAUTH_CLIENT_SECRET='vc1fZfV1cZC6mgDSHV-KSPOz';print auth.get_authenticator_for_host('pinpoint',auth.make_auth_config()).login()"
Hans Wennborg62e06b212018-06-18 14:44:4260
61 a. Generate a fresh Oath2 token:
62
Hans Wennborg62e06b212018-06-18 14:44:4263 $ TOKEN=$(PYTHONPATH=$(dirname $(which git-cl)) python -c"import auth;print auth.get_authenticator_for_host('pinpoint',auth.make_auth_config()).get_access_token().token")
Hans Wennborg62e06b212018-06-18 14:44:4264
65 a. Launch Pinpoint job:
66
Hans Wennborg62e06b212018-06-18 14:44:4267 $ curl -H"Authorization: Bearer $TOKEN" -F configuration=chromium-rel-win7-gpu-nvidia \
68 -F target=telemetry_perf_tests -F benchmark=speedometer2 \
69 -F patch=https://chromium-review.googlesource.com/c/chromium/src/+/$(git cl issue | cut -d' ' -f3) \
70 -F start_git_hash=HEAD -F end_git_hash=HEAD https://pinpoint-dot-chromeperf.appspot.com/api/new
Hans Wennborg62e06b212018-06-18 14:44:4271
72 a. Use the URL returned by the command above to see the progress and result
73 of the tryjob, checking that it doesn't regress significantly (> 10%).
74 Post the URL to the codereview.
75
nodir06cbaa02015-08-25 17:15:24761. Commit roll CL from the first step
771. The bots will now pull the prebuilt binary, and goma will have a matching
78 binary, too.