Skip to content

Commit 418abca

Browse files
authored
Fix build on macos with apple M1 chip (#2846)
* Fix issue #2845
1 parent cfe2537 commit 418abca

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ LINKOPTS = [
5656
"-pthread",
5757
"-ldl",
5858
] + select({
59-
"@bazel_tools//tools/osx:darwin_x86_64": [
59+
"@bazel_tools//src/conditions:darwin": [
6060
"-framework CoreFoundation",
6161
"-framework CoreGraphics",
6262
"-framework CoreData",
@@ -225,7 +225,7 @@ BUTIL_SRCS = [
225225
"src/butil/recordio.cc",
226226
"src/butil/popen.cpp",
227227
] + select({
228-
"@bazel_tools//tools/osx:darwin_x86_64": [
228+
"@bazel_tools//src/conditions:darwin": [
229229
"src/butil/time/time_mac.cc",
230230
"src/butil/mac/scoped_mach_port.cc",
231231
],
@@ -340,7 +340,7 @@ cc_library(
340340
"//bazel/config:brpc_with_glog": ["@com_github_google_glog//:glog"],
341341
"//conditions:default": [],
342342
}) + select({
343-
"@bazel_tools//tools/osx:darwin_x86_64": [":macos_lib"],
343+
"@bazel_tools//src/conditions:darwin": [":macos_lib"],
344344
"//conditions:default": [],
345345
}) + select({
346346
"//bazel/config:brpc_with_boringssl": ["@boringssl//:ssl", "@boringssl//:crypto"],

MODULE.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ bazel_dep(name = 'protobuf', version = '27.3', repo_name = 'com_google_protobuf'
1212
bazel_dep(name = 'gflags', version = '2.2.2', repo_name = 'com_github_gflags_gflags')
1313
bazel_dep(name = 'glog', version = '0.5.0', repo_name = 'com_github_google_glog')
1414
bazel_dep(name = 'platforms', version = '0.0.4')
15+
bazel_dep(name = "apple_support", version = "1.17.1")
1516
bazel_dep(name = 'rules_cc', version = '0.0.1')
1617
bazel_dep(name = 'rules_proto', version = '4.0.0')
1718
bazel_dep(name = 'zlib', version = '1.2.13', repo_name = 'com_github_madler_zlib')
1819

1920
# --registry=https://baidu.github.io/babylon/registry
2021
bazel_dep(name = 'leveldb', version = '1.23', repo_name = 'com_github_google_leveldb')
22+
single_version_override(
23+
module_name = "leveldb",
24+
registry = "https://raw.githubusercontent.com/secretflow/bazel-registry/main",
25+
)
2126
bazel_dep(name = 'openssl', version = '3.3.2')
27+
single_version_override(
28+
module_name = "openssl",
29+
version = "3.3.2.bcr.1",
30+
registry = "https://raw.githubusercontent.com/secretflow/bazel-registry/main",
31+
)
2232
bazel_dep(name = 'thrift', version = '0.21.0', repo_name = 'org_apache_thrift')
2333

2434
# test only

0 commit comments

Comments
 (0)