forked from bazelbuild/reclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelversion
49 lines (41 loc) · 1.64 KB
/
.bazelversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
6.3.2
### PLEASE READ ###
Bazelisk only reads the first line of this file. Don't move this up.
When upgrading bazel, you must also upgrade toolchains.
1. Install rbe_configs_gen:
1.1: $ git clone https://github.com/bazelbuild/bazel-toolchains
1.2: $ cd bazel-toolchains
1.3: $ go install ./cmd/rbe_configs_gen/rbe_configs_gen.go
2. Run it for Linux:
```
export RECLIENT_BUILDER_V=v13
export NEW_BAZEL_VERSION=$(head -n 1 .bazelversion | tail -n 1)
export PATH_TO_RECLIENT=$PWD
export GCR_IMAGE=gcr.io/reclient-releases/reclient-builder:${RECLIENT_BUILDER_V}
rbe_configs_gen \
--output_src_root=${PATH_TO_RECLIENT} \
--output_config_path=configs/linux \
--exec_os=linux \
--target_os=linux \
--toolchain_container=${GCR_IMAGE} \
--bazel_version=${NEW_BAZEL_VERSION} \
--generate_java_configs=false
bazelisk run //:gazelle
```
Edit the cc_toolchain_suite in //configs/linux/cc/BUILD.bazel to include
`tags=["manual"]` so it isn't caught by `...` expansion.
3. Run it for Windows. You'll need a windows machine/cloudtop/GCE VM.
$ set RECLIENT_BUILDER_V=v4
$ set NEW_BAZEL_VERSION=6.3.2
$ set PATH_TO_RECLIENT=%CD%
$ rbe_configs_gen.exe^
--output_src_root=%PATH_TO_RECLIENT%^
--output_config_path=configs/windows^
--exec_os=windows^
--target_os=windows^
--toolchain_container=gcr.io/reclient-releases/reclient-builder-win:%RECLIENT_BUILDER_V%^
--cpp_toolchain_target=cc-compiler-x64_windows-clang-cl^
--bazel_version=%NEW_BAZEL_VERSION%^
--generate_java_configs=false
Edit the cc_toolchain_suite in //configs/windows/cc/BUILD.bazel to include
`tags=["manual"]` so it isn't caught by `...` expansion.