Skip to content

Commit 3e5ffdf

Browse files
committed
[bazel] Add note on working with Apple Silicon
1 parent 73ba669 commit 3e5ffdf

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

BUILD.bazel

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,24 @@ alias(
3333

3434
java_binary(
3535
name = "server",
36+
args = [
37+
"standalone",
38+
"--relax-checks",
39+
"true",
40+
],
41+
data = chrome_data + firefox_data,
42+
jvm_flags = chrome_jvm_flags + firefox_jvm_flags,
3643
main_class = "org.openqa.selenium.grid.Bootstrap",
3744
runtime_deps = [
3845
"//java/server/src/org/openqa/selenium/grid",
3946
artifact("org.slf4j:slf4j-jdk14"),
4047
],
41-
jvm_flags = chrome_jvm_flags + firefox_jvm_flags,
42-
data = chrome_data + firefox_data,
43-
args = [
44-
"standalone",
45-
"--relax-checks",
46-
"true",
48+
)
49+
50+
platform(
51+
name = "rosetta",
52+
constraint_values = [
53+
"@platforms//os:osx",
54+
"@platforms//cpu:x86_64",
4755
],
4856
)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ The following command should work:
5858
xcode-select --install
5959
```
6060

61+
* Users of Apple Silicon Macs should add `build
62+
--host_platform=//:rosetta` to their `.bazelrc.local` file. We are working
63+
to make sure this isn't required in the long run.
64+
6165
* Windows users should have the latest version of Visual Studio command line tools and build tools installed
6266
* `BAZEL_VS` environment variable should point to the location of the build tools,
6367
e.g. `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools`

0 commit comments

Comments
 (0)