andybons | 3322f76 | 2015-08-24 21:37:09 | [diff] [blame] | 1 | # Updating clang |
| 2 | |
nodir | 06cbaa0 | 2015-08-25 17:15:24 | [diff] [blame] | 3 | 1. Sync your Chromium tree to the latest revision to pick up any plugin |
rnk | 61e1abc6 | 2016-05-04 16:50:21 | [diff] [blame] | 4 | changes |
pcc | c9228e4 | 2017-06-16 10:36:53 | [diff] [blame] | 5 | 1. Run `python tools/clang/scripts/upload_revision.py NNNN` |
hans | c3a6616 | 2017-05-12 16:27:07 | [diff] [blame] | 6 | with the target LLVM SVN revision number. This creates a roll CL on a new |
| 7 | branch, uploads it and starts tryjobs that build the compiler binaries into |
| 8 | a staging bucket on Google Cloud Storage (GCS). |
| 9 | 1. If the clang upload try bots succeed, copy the binaries from the staging |
| 10 | bucket to the production one. For example: |
| 11 | |
inglorion | d277c61f | 2017-09-15 23:08:06 | [diff] [blame] | 12 | ```shell |
| 13 | $ export rev=123456-1 |
| 14 | $ for x in Linux_x64 Mac Win ; do \ |
| 15 | gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/clang-$rev.tgz \ |
| 16 | gs://chromium-browser-clang/$x/clang-$rev.tgz ; \ |
| 17 | gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmobjdump-$rev.tgz \ |
| 18 | gs://chromium-browser-clang/$x/llvmobjdump-$rev.tgz ; \ |
Mitch Phillips | cab45830 | 2017-11-20 21:44:36 | [diff] [blame] | 19 | gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvmcfiverify-$rev.tgz \ |
| 20 | gs://chromium-browser-clang/$x/llvmcfiverify-$rev.tgz ; \ |
inglorion | d277c61f | 2017-09-15 23:08:06 | [diff] [blame] | 21 | gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/translation_unit-$rev.tgz \ |
| 22 | gs://chromium-browser-clang/$x/translation_unit-$rev.tgz ; \ |
| 23 | gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/$x/llvm-code-coverage-$rev.tgz \ |
| 24 | gs://chromium-browser-clang/$x/llvm-code-coverage-$rev.tgz ; \ |
| 25 | done |
Nico Weber | 2516225 | 2017-10-09 18:00:51 | [diff] [blame] | 26 | $ gsutil.py cp -n -a public-read gs://chromium-browser-clang-staging/Mac/lld-$rev.tgz \ |
Hans Wennborg | e583b5e | 2017-10-11 02:40:55 | [diff] [blame] | 27 | gs://chromium-browser-clang/Mac/lld-$rev.tgz |
inglorion | d277c61f | 2017-09-15 23:08:06 | [diff] [blame] | 28 | ``` |
Hans Wennborg | e583b5e | 2017-10-11 02:40:55 | [diff] [blame] | 29 | |
hans | c3a6616 | 2017-05-12 16:27:07 | [diff] [blame] | 30 | 1. Run the goma package update script to push these packages to goma. If you do |
| 31 | not have the necessary credentials to do the upload, ask clang@chromium.org |
| 32 | to find someone who does |
thakis | 3447dcd | 2016-05-05 18:17:15 | [diff] [blame] | 33 | 1. Run an exhaustive set of try jobs to test the new compiler: |
inglorion | d277c61f | 2017-09-15 23:08:06 | [diff] [blame] | 34 | |
| 35 | ```shell |
Nico Weber | b8603fb | 2018-05-21 15:42:10 | [diff] [blame] | 36 | git cl try && |
| 37 | git cl try -m tryserver.chromium.mac -b mac_chromium_asan_rel_ng && |
inglorion | 475c6e19 | 2018-06-22 20:42:25 | [diff] [blame] | 38 | git cl try -m tryserver.chromium.linux -b linux_chromium_cfi_rel_ng && |
Nico Weber | b8603fb | 2018-05-21 15:42:10 | [diff] [blame] | 39 | git cl try -m tryserver.blink -b linux_trusty_blink_rel && |
inglorion | 475c6e19 | 2018-06-22 20:42:25 | [diff] [blame] | 40 | git cl try -B luci.chromium.try -b ios-device \ |
| 41 | -b linux_chromium_chromeos_asan_rel_ng -b linux_chromium_msan_rel_ng \ |
| 42 | -b linux_chromium_chromeos_msan_rel_ng -b linux-chromeos-dbg |
inglorion | d277c61f | 2017-09-15 23:08:06 | [diff] [blame] | 43 | ``` |
| 44 | |
Hans Wennborg | 62e06b21 | 2018-06-18 14:44:42 | [diff] [blame] | 45 | 1. Start Pinpoint perf tryjobs. These are generally too noisy to catch minor |
| 46 | regressions pre-commit, but make sure there are no large regressions. |
| 47 | |
| 48 | a. (Log in to store OAuth2 token in the depot_tools cache. Only needs to be |
| 49 | run once:) |
| 50 | |
| 51 | ```shell |
| 52 | $ 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()" |
| 53 | ``` |
| 54 | |
| 55 | a. Generate a fresh Oath2 token: |
| 56 | |
| 57 | ```shell |
| 58 | $ 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") |
| 59 | ``` |
| 60 | |
| 61 | a. Launch Pinpoint job: |
| 62 | |
| 63 | ```shell |
| 64 | $ curl -H"Authorization: Bearer $TOKEN" -F configuration=chromium-rel-win7-gpu-nvidia \ |
| 65 | -F target=telemetry_perf_tests -F benchmark=speedometer2 \ |
| 66 | -F patch=https://chromium-review.googlesource.com/c/chromium/src/+/$(git cl issue | cut -d' ' -f3) \ |
| 67 | -F start_git_hash=HEAD -F end_git_hash=HEAD https://pinpoint-dot-chromeperf.appspot.com/api/new |
| 68 | ``` |
| 69 | |
| 70 | a. Use the URL returned by the command above to see the progress and result |
| 71 | of the tryjob, checking that it doesn't regress significantly (> 10%). |
| 72 | Post the URL to the codereview. |
| 73 | |
nodir | 06cbaa0 | 2015-08-25 17:15:24 | [diff] [blame] | 74 | 1. Commit roll CL from the first step |
| 75 | 1. The bots will now pull the prebuilt binary, and goma will have a matching |
| 76 | binary, too. |