Skip to content

Commit

Permalink
build: Use apple_support to configure the objc toolchain
Browse files Browse the repository at this point in the history
This is required starting with Bazel 7.
  • Loading branch information
robinlinden committed Dec 13, 2023
1 parent b5b76b9 commit bf78314
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ build:linux --features=layering_check
build:linux --cxxopt='-std=c++2b'
build:linux --cxxopt='-fno-rtti'

build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --features=layering_check
build:macos --cxxopt='-std=c++2b'
build:macos --cxxopt='-fno-rtti'
Expand Down
12 changes: 12 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Bazel
# =========================================================

# https://github.com/bazelbuild/apple_support
http_archive(
name = "build_bazel_apple_support",
sha256 = "cf4d63f39c7ba9059f70e995bf5fe1019267d3f77379c2028561a5d7645ef67c",
url = "https://github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
)

# https://github.com/bazelbuild/platforms
http_archive(
name = "platforms", # Apache-2.0
Expand Down Expand Up @@ -308,6 +315,11 @@ http_archive(
# This needs to go last so that we can override any dependencies these calls may
# pull in.

# build_bazel_apple_support
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")

apple_support_dependencies()

# rules_python
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

Expand Down

0 comments on commit bf78314

Please sign in to comment.