Skip to content

Commit

Permalink
Support Build on M1 MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
GehaFearless committed Aug 1, 2022
1 parent b04ad47 commit cd467d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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

0 comments on commit cd467d1

Please sign in to comment.