Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support Build on M1 MacOS #1094

Merged
merged 3 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ header:
- 'src/rdsn/src/nfs/test/nfs_test_file2'
- 'src/rdsn/src/runtime/test/gtest.filter'
- 'thirdparty/fix_fds_for_macos.patch'
- 'thirdparty/fix_jemalloc_for_m1_on_macos.patch'
- 'thirdparty/fix_libevent_for_macos.patch'
- 'thirdparty/fix_s2_for_aarch64.patch'
- 'thirdparty/fix_thrift_for_cpp11.patch'
Expand Down
1 change: 1 addition & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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