Skip to content

Commit

Permalink
Bazel: patch apple_support to avoid registering its toolchain
Browse files Browse the repository at this point in the history
This is done in order to avoid requiring a full Xcode installation, but
still being able to use other `apple_support` facilities, like
`universal_binary`.
  • Loading branch information
redsun82 committed Apr 29, 2024
1 parent e7886d0 commit cb85a75
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local_path_override(

# see https://registry.bazel.build/ for a list of available packages

bazel_dep(name = "apple_support", version = "1.15.1")
bazel_dep(name = "apple_support", version = "1.15.1-codeql.1")
bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "rules_go", version = "0.47.0")
bazel_dep(name = "rules_pkg", version = "0.10.1")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module(
name = "apple_support",
version = "1.15.1-codeql.1",
bazel_compatibility = [">=6.0.0"],
compatibility_level = 1,
repo_name = "build_bazel_apple_support",
)

bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "platforms", version = "0.0.9")

bazel_dep(
name = "stardoc",
version = "0.6.2",
dev_dependency = True,
repo_name = "io_bazel_stardoc",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/MODULE.bazel b/MODULE.bazel
index 6b06c3b..99bc7c6 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -1,6 +1,6 @@
module(
name = "apple_support",
- version = "0",
+ version = "1.15.1-codeql.1",
bazel_compatibility = [">=6.0.0"],
compatibility_level = 1,
repo_name = "build_bazel_apple_support",
@@ -16,7 +16,3 @@ bazel_dep(
repo_name = "io_bazel_stardoc",
)

-apple_cc_configure = use_extension("//crosstool:setup.bzl", "apple_cc_configure_extension")
-use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_toolchains")
-
-register_toolchains("@local_config_apple_cc_toolchains//:all")
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-xLsrc2fEhDgjAK7nW+WYuS+EeJb7MbvSLzojRq32aoA=",
"strip_prefix": "",
"url": "https://github.com/bazelbuild/apple_support/releases/download/1.15.1/apple_support.1.15.1.tar.gz",
"patches": {
"module.patch": "sha256-K06B2W9t6nKcU8S5u6cWeNIdw/vGWWKAoJdGiI8CSS0="
},
"patch_strip": 1
}
5 changes: 5 additions & 0 deletions misc/bazel/registry/modules/apple_support/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"versions": [
"1.15.1-codeql.1"
]
}

0 comments on commit cb85a75

Please sign in to comment.