1
1
common --enable_bzlmod
2
2
common --lockfile_mode=update
3
3
4
-
5
4
# Use a minimal set of environment variables for action execution to improve
6
5
# build hermeticity and remote cache hits.
7
6
common --incompatible_strict_action_env
8
7
9
-
10
8
# Enable BuildBuddy build event service
11
9
common --bes_results_url=https://app.buildbuddy.io/invocation/
12
10
common --bes_backend=grpcs://remote.buildbuddy.io
13
11
# Enable BuildBuddy Remote Execution
14
12
common:remote --remote_timeout=3600
15
13
common:remote --remote_executor=grpcs://remote.buildbuddy.io
16
14
17
-
18
15
## Register "execution platforms" and "cc toolchains" using Bazel flag.
19
16
#
20
17
# Relevant toolchains are registered automatically inside "toolchains_buildbuddy" module's MODULE.bazel file.
@@ -25,7 +22,9 @@ common:remote --remote_executor=grpcs://remote.buildbuddy.io
25
22
# These will take precedence over the default ones.
26
23
#
27
24
# The flags `--extra_execution_platforms` and `--extra_toolchains` are used to override the staticcally
28
- # registered toolchains and execution platforms.
25
+ # registered toolchains and execution platforms. This is recommended as other Bazel Modules (i.e. rules_cc)
26
+ # may register their cc toolchains earlier and take default priority.
27
+ #
29
28
# For example:
30
29
#
31
30
# common:remote-linux --extra_execution_platforms=@toolchains_buildbuddy//platforms:linux_x86_64
@@ -39,7 +38,6 @@ common:remote --remote_executor=grpcs://remote.buildbuddy.io
39
38
# - https://bazel.build/rules/lib/globals/module#register_execution_platforms
40
39
# - https://bazel.build/rules/lib/globals/module#register_toolchains
41
40
42
-
43
41
## Target Linux platform when build remotely
44
42
#
45
43
# Usage:
@@ -49,17 +47,22 @@ common:remote --remote_executor=grpcs://remote.buildbuddy.io
49
47
common:remote-linux --config=remote
50
48
common:remote-linux --platforms=@toolchains_buildbuddy//platforms:linux_x86_64
51
49
common:remote-linux --extra_execution_platforms=@toolchains_buildbuddy//platforms:linux_x86_64
50
+ # (Optional) Explicitly tell Bazel to use this toolchain
51
+ # common:remote-linux --extra_toolchains=@toolchains_buildbuddy//toolchains/cc:ubuntu_gcc_x86_64
52
52
53
53
common:remote-linux-arm64 --config=remote
54
54
common:remote-linux-arm64 --platforms=@toolchains_buildbuddy//platforms:linux_arm64
55
55
common:remote-linux-arm64 --extra_execution_platforms=@toolchains_buildbuddy//platforms:linux_arm64
56
+ # (Optional) Explicitly tell Bazel to use this toolchain
57
+ # common:remote-linux --extra_toolchains=@toolchains_buildbuddy//toolchains/cc:ubuntu_gcc_arm64
56
58
57
59
## Using custom Linux platform
58
- #
60
+ #
59
61
# This helps verify that user can extend our platform definitions via inheritence.
60
62
common:custom-linux --config=remote
61
63
common:custom-linux --platforms=//:my_linux_platform
62
64
common:custom-linux --extra_execution_platforms=//:my_linux_platform
65
+ common:remote-linux --extra_toolchains=@toolchains_buildbuddy//toolchains/cc:ubuntu_gcc_x86_64
63
66
64
67
## Target Windows platform when build remotely
65
68
#
@@ -70,7 +73,8 @@ common:custom-linux --extra_execution_platforms=//:my_linux_platform
70
73
common:remote-windows --config=remote
71
74
common:remote-windows --platforms=@toolchains_buildbuddy//platforms:windows_x86_64
72
75
common:remote-windows --extra_execution_platforms=@toolchains_buildbuddy//platforms:windows_x86_64
73
-
76
+ # (Optional) Explicitly tell Bazel to use this toolchain
77
+ # common:remote-linux --extra_toolchains=@toolchains_buildbuddy//toolchains/cc:windows_msvc_x86_64
74
78
75
79
# Separate file to keep API Key that should have the follow flag
76
80
#
0 commit comments