Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support Build on M1 MacOS
Browse files Browse the repository at this point in the history
GehaFearless committed Aug 2, 2022
1 parent b04ad47 commit 5d881ac
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -90,6 +90,7 @@ header:
- 'thirdparty/fix_libevent_for_macos.patch'
- 'thirdparty/fix_s2_for_aarch64.patch'
- 'thirdparty/fix_thrift_for_cpp11.patch'
- 'thirdparty/fix_jemalloc_for_m1_on_macos.patch'
# should be empty, or ignore all comment lines
- 'src/rdsn/src/utils/test/config-empty.ini'
# The MIT License (MIT), Copyright (c) 2015 Microsoft Corporation
1 change: 1 addition & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -381,6 +381,7 @@ ExternalProject_Add(jemalloc
URL ${OSS_URL_PREFIX}/jemalloc-5.2.1.tar.bz2
https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2
URL_MD5 3d41fbf006e6ebffd489bdb304d009ae
PATCH_COMMAND patch -p0 < ${TP_DIR}/fix_jemalloc_for_m1_on_macos.patch
CONFIGURE_COMMAND ./configure --prefix=${TP_OUTPUT} --enable-cxx --enable-stats --enable-prof
BUILD_COMMAND make
INSTALL_COMMAND make install
10 changes: 10 additions & 0 deletions thirdparty/fix_jemalloc_for_m1_on_macos.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- configure 2022-02-16 01:43:33.470553518 +0000
+++ configure.new 2022-02-16 01:43:24.149733186 +0000
@@ -7175,6 +7175,7 @@
fi

fi
+if test "x${je_cv_lg_vaddr}" = "x0" ; then je_cv_lg_vaddr=48 ;fi # For podman/docker/qemu on macos dev build.
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $je_cv_lg_vaddr" >&5
$as_echo "$je_cv_lg_vaddr" >&6; }
if test "x${je_cv_lg_vaddr}" != "x" ; then

0 comments on commit 5d881ac

Please sign in to comment.