Skip to content

Commit

Permalink
Add new darwin CC toolchain for tests (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith authored Mar 4, 2023
1 parent 798242e commit d33d862
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

# Required for Windows
build --enable_runfiles

# These are required otherwise paths are too long
startup --windows_enable_symlinks
build --action_env=MSYS=winsymlinks:nativestrict
test --action_env=MSYS=winsymlinks:nativestrict

# Enable CC toolchain that supports iOS from https://github.com/bazelbuild/apple_support
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
7 changes: 7 additions & 0 deletions examples/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ rbe_preconfig(
toolchain = "ubuntu1804-bazel-java11",
)

http_archive(
name = "build_bazel_apple_support",
patches = ["//deps:apple_support.patch"],
sha256 = "77a121a0f5d4cd88824429464ad2bfb54bdc8a3bccdb4d31a6c846003a3f5e44",
url = "https://github.com/bazelbuild/apple_support/releases/download/1.4.1/apple_support.1.4.1.tar.gz",
)

http_archive(
name = "build_bazel_rules_apple",
sha256 = "12865e5944f09d16364aa78050366aca9dc35a32a018fa35f5950238b08bf744",
Expand Down
8 changes: 8 additions & 0 deletions examples/deps/apple_support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- crosstool/setup.bzl
+++ crosstool/setup.bzl
@@ -66,5 +66,3 @@ def apple_cc_configure():
def _apple_cc_configure_extension_impl(_):
_apple_cc_autoconf_toolchains(name = "local_config_apple_cc_toolchains")
_apple_cc_autoconf(name = "local_config_apple_cc")
-
-apple_cc_configure_extension = module_extension(implementation = _apple_cc_configure_extension_impl)

0 comments on commit d33d862

Please sign in to comment.