@@ -227,24 +227,29 @@ register_toolchains("@rules_scala//protoc:all")
227
227
228
228
#### Specifying additional ` protoc ` platforms
229
229
230
- Use the ` protoc_platforms ` parameter to specify additional required
231
- [ platforms] [ ] if the execution or target platforms differ from the host
232
- platform. Valid values come from [ protocolbuffers/protobuf releases] [ ] file name
233
- suffixes. It's also safe to explicitly include the host platform.
230
+ Use the ` protoc_platforms ` parameter to specify additional [ platforms] [ ] if the
231
+ execution platform may differ from the host platform, as when building with
232
+ remote execution. Valid values come from the file name suffixes of
233
+ [ protocolbuffers/protobuf releases] [ ] . It's also safe to explicitly include the
234
+ host platform.
234
235
235
236
[ platforms ] : https://bazel.build/extending/platforms
236
237
[ protocolbuffers/protobuf releases ] : https://github.com/protocolbuffers/protobuf/releases
237
238
238
- For example, imagine the execution or target platform is Linux running on an x86
239
- processor, but the host platform is macOS running on Apple Silicon .
239
+ For example, imagine the host platform is macOS running on Apple Silicon, but
240
+ the remote execution platform is Linux running on an x86 processor .
240
241
` rules_scala ` configures the ` "osx-aarch_64" ` platform automatically. Then in
241
242
` MODULE.bazel ` you would include:
242
243
243
244
``` py
244
245
# MODULE.bazel
245
246
247
+ scala_deps = use_extension(
248
+ " @rules_scala//scala/extensions:deps.bzl" ,
249
+ " scala_deps" ,
250
+ )
251
+
246
252
scala_deps.toolchains(
247
- # Other settings...
248
253
protoc_platforms = [" linux-x86_64" ],
249
254
)
250
255
```
@@ -254,8 +259,12 @@ In `WORKSPACE` you would include:
254
259
``` py
255
260
# WORKSPACE
256
261
262
+ load(
263
+ " @rules_scala//scala:toolchains.bzl" ,
264
+ " scala_toolchains" ,
265
+ )
266
+
257
267
scala_toolchains(
258
- # Other settings...
259
268
protoc_platforms = [" linux-x86_64" ],
260
269
)
261
270
```
0 commit comments