Skip to content

Commit

Permalink
Fix build on macos with apple M1 chip
Browse files Browse the repository at this point in the history
* Fix issue #2845
  • Loading branch information
tongke6 committed Dec 12, 2024
1 parent 282bc90 commit b0a9465
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ LINKOPTS = [
"-pthread",
"-ldl",
] + select({
"@bazel_tools//tools/osx:darwin_x86_64": [
"@bazel_tools//src/conditions:darwin": [
"-framework CoreFoundation",
"-framework CoreGraphics",
"-framework CoreData",
Expand Down Expand Up @@ -226,7 +226,7 @@ BUTIL_SRCS = [
"src/butil/recordio.cc",
"src/butil/popen.cpp",
] + select({
"@bazel_tools//tools/osx:darwin_x86_64": [
"@bazel_tools//src/conditions:darwin": [
"src/butil/time/time_mac.cc",
"src/butil/mac/scoped_mach_port.cc",
],
Expand Down Expand Up @@ -341,7 +341,7 @@ cc_library(
"//bazel/config:brpc_with_glog": ["@com_github_google_glog//:glog"],
"//conditions:default": [],
}) + select({
"@bazel_tools//tools/osx:darwin_x86_64": [":macos_lib"],
"@bazel_tools//src/conditions:darwin": [":macos_lib"],
"//conditions:default": [],
}) + select({
"//bazel/config:brpc_with_boringssl": ["@boringssl//:ssl", "@boringssl//:crypto"],
Expand Down
10 changes: 10 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,23 @@ bazel_dep(name = 'protobuf', version = '27.3', repo_name = 'com_google_protobuf'
bazel_dep(name = 'gflags', version = '2.2.2', repo_name = 'com_github_gflags_gflags')
bazel_dep(name = 'glog', version = '0.5.0', repo_name = 'com_github_google_glog')
bazel_dep(name = 'platforms', version = '0.0.4')
bazel_dep(name = "apple_support", version = "1.17.1")
bazel_dep(name = 'rules_cc', version = '0.0.1')
bazel_dep(name = 'rules_proto', version = '4.0.0')
bazel_dep(name = 'zlib', version = '1.2.13', repo_name = 'com_github_madler_zlib')

# --registry=https://baidu.github.io/babylon/registry
bazel_dep(name = 'leveldb', version = '1.23', repo_name = 'com_github_google_leveldb')
single_version_override(
module_name = "leveldb",
registry = "https://raw.githubusercontent.com/secretflow/bazel-registry/main",
)
bazel_dep(name = 'openssl', version = '3.3.2')
single_version_override(
module_name = "openssl",
version = "3.3.2.bcr.1",
registry = "https://raw.githubusercontent.com/secretflow/bazel-registry/main",
)
bazel_dep(name = 'thrift', version = '0.21.0', repo_name = 'org_apache_thrift')

# test only
Expand Down

0 comments on commit b0a9465

Please sign in to comment.