Skip to content

Commit

Permalink
bazel: patch rules_foreign_cc to support arm64 macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Jan 16, 2021
1 parent a41a95f commit bba0a26
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
6 changes: 4 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ bazel_skylib_workspace()

http_archive(
name = "rules_foreign_cc",
strip_prefix = "rules_foreign_cc-master",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/master.zip",
patches = ["@rtorrent//:third_party/rules_foreign_cc.patch"],
sha256 = "3c6445404e9e5d17fa0ecdef61be00dd93b20222c11f45e146a98c0a3f67defa",
strip_prefix = "rules_foreign_cc-d54c78ab86b40770ee19f0949db9d74a831ab9f0",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/d54c78ab86b40770ee19f0949db9d74a831ab9f0.zip",
)

load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
Expand Down
24 changes: 24 additions & 0 deletions third_party/rules_foreign_cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- tools/build_defs/shell_toolchain/toolchains/toolchain_mappings.bzl
+++ tools/build_defs/shell_toolchain/toolchains/toolchain_mappings.bzl
@@ -11,21 +11,18 @@ TOOLCHAIN_MAPPINGS = [
ToolchainMapping(
exec_compatible_with = [
"@bazel_tools//platforms:linux",
- "@bazel_tools//platforms:x86_64",
],
file = "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains/impl:linux_commands.bzl",
),
ToolchainMapping(
exec_compatible_with = [
"@bazel_tools//platforms:windows",
- "@bazel_tools//platforms:x86_64",
],
file = "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains/impl:windows_commands.bzl",
),
ToolchainMapping(
exec_compatible_with = [
"@bazel_tools//platforms:osx",
- "@bazel_tools//platforms:x86_64",
],
file = "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains/impl:osx_commands.bzl",
),

0 comments on commit bba0a26

Please sign in to comment.