Skip to content

Commit

Permalink
Fix macOS builds by updating the minimum OSX version target
Browse files Browse the repository at this point in the history
This commit bumps the minimum macOS version target to 10.12, from 10.9
previously. The reason is that a newer LLVM version, which the XLA
compiler depended on, used `std::shared_mutex`, which is only available
starting at macOS 10.12.

The fix here consists of setting the minimum version target flag that
bazel consumes for the build to 10.12.
  • Loading branch information
nicholasjng committed May 31, 2022
1 parent d43cb36 commit 7f7358c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the default Apple platform to macOS.
build --apple_platform_type=macos
build --macos_minimum_os=10.9
build --macos_minimum_os=10.12

# Make Bazel print out all options from rc files.
build --announce_rc
Expand Down
2 changes: 1 addition & 1 deletion build/build_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def build_wheel(sources_path, output_path, cpu):
("Linux", "x86_64"): ("manylinux2014", "x86_64"),
("Linux", "aarch64"): ("manylinux2014", "aarch64"),
("Linux", "ppc64le"): ("manylinux2014", "ppc64le"),
("Darwin", "x86_64"): ("macosx_10_9", "x86_64"),
("Darwin", "x86_64"): ("macosx_10_12", "x86_64"),
("Darwin", "arm64"): ("macosx_11_0", "arm64"),
("Windows", "AMD64"): ("win", "amd64"),
}[(platform.system(), cpu)]
Expand Down

0 comments on commit 7f7358c

Please sign in to comment.