This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 418abca2 Fix build on macos with apple M1 chip (#2846)
418abca2 is described below

commit 418abca2523c74f105ef811ba4c805a2029fde5f
Author: tongke <[email protected]>
AuthorDate: Sun Feb 9 19:53:28 2025 +0800

    Fix build on macos with apple M1 chip (#2846)
    
    * Fix issue https://github.com/apache/brpc/issues/2845
---
 BUILD.bazel  |  6 +++---
 MODULE.bazel | 10 ++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/BUILD.bazel b/BUILD.bazel
index 8880dc2b..3237e6c4 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -56,7 +56,7 @@ LINKOPTS = [
     "-pthread",
     "-ldl",
 ] + select({
-    "@bazel_tools//tools/osx:darwin_x86_64": [
+    "@bazel_tools//src/conditions:darwin": [
         "-framework CoreFoundation",
         "-framework CoreGraphics",
         "-framework CoreData",
@@ -225,7 +225,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",
     ],
@@ -340,7 +340,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"],
diff --git a/MODULE.bazel b/MODULE.bazel
index 07955f25..e18e5c47 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to