Skip to content

Commit

Permalink
linux-aarch64 no longer allows for 16K page size (#28)
Browse files Browse the repository at this point in the history
* linux-aarch64 no longer allows for 16K page size
Fixes #26

* remove conditional for non arm cases

* Update build/build.sh

Co-authored-by: Robo <hop2deep@gmail.com>

* Update build/build.sh

Co-authored-by: Robo <hop2deep@gmail.com>

* chore: cleanup conditions

---------

Co-authored-by: Robo <hop2deep@gmail.com>
  • Loading branch information
andreamah and deepak1556 authored Jun 6, 2023
1 parent aa3a29d commit f9291b0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ set -ex
main() {
CARGO="$(builder)"

if is_linux && is_musl; then
# jemalloc doesn't allow 16K page sizes for linux musl
# https://github.com/microsoft/ripgrep-prebuilt/issues/26
JEMALLOC_SYS_WITH_LG_PAGE=14
fi

# Test a normal debug build.
if is_arm || is_aarch64 || is_ppc64le; then
"$CARGO" build --target "$TARGET" --release --features 'pcre2'
# pcre2 is not supported on s390x
# https://github.com/zherczeg/sljit/issues/89
elif is_s390x; then
"$CARGO" build --release --target=$TARGET
elif is_aarch64_musl; then
# force jemalloc to allow 16K page sizes for linux musl
# https://github.com/microsoft/ripgrep-prebuilt/issues/26
JEMALLOC_SYS_WITH_LG_PAGE=14 "$CARGO" build --target "$TARGET" --release --features 'pcre2'
else
# Technically, MUSL builds will force PCRE2 to get statically compiled,
# but we also want PCRE2 statically build for macOS binaries.
Expand Down

0 comments on commit f9291b0

Please sign in to comment.