From 0a2dea50fe5d760c6bd70810de9402848eb454fc Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 22 Feb 2023 10:44:54 -0800 Subject: [PATCH] Add new darwin CC toolchain for tests With bazel 7.x the darwin toolchain that supports iOS / Objective-C is moving out of bazel and into apple_support. This adds that toolchain since it's exercised for tests. --- .bazelrc | 5 +++++ WORKSPACE | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.bazelrc b/.bazelrc index c0e9e1cb73..51929cb16a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,8 @@ +build --enable_platform_specific_config +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:windows --cpu=x64_windows build:windows --compiler=mingw-gcc diff --git a/WORKSPACE b/WORKSPACE index d436703ff0..686f29d87c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -164,3 +164,17 @@ http_archive( load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() + +# For testing objc_library interop, users should not need to install it +http_archive( + name = "build_bazel_apple_support", + sha256 = "77a121a0f5d4cd88824429464ad2bfb54bdc8a3bccdb4d31a6c846003a3f5e44", + url = "https://github.com/bazelbuild/apple_support/releases/download/1.4.1/apple_support.1.4.1.tar.gz", +) + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", +) + +apple_support_dependencies()