Skip to content

Commit

Permalink
Merge pull request #1138 from Chilledheart/musl_call_no_madvise
Browse files Browse the repository at this point in the history
[compatiblity] musl/openwrt: don't call madvise any more
  • Loading branch information
Chilledheart authored Oct 27, 2024
2 parents c2f4082 + 47cef55 commit 200b76e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/releases-openwrt-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ jobs:
rm -f *.tar.gz
- name: Build Binary
run: |
./tools/build --variant cli --arch ${{ matrix.arch }} --system linux --subsystem openwrt --sysroot ${{ env.SDK_ROOT }} \
-build-benchmark -build-test -nc ${{ matrix.extra_flags }}
./tools/build --variant server --arch ${{ matrix.arch }} --system linux --subsystem openwrt --sysroot ${{ env.SDK_ROOT }} \
-build-benchmark -build-test -nc ${{ matrix.extra_flags }}
./tools/build --variant cli --arch ${{ matrix.arch }} \
--system linux --subsystem openwrt --sysroot ${{ env.SDK_ROOT }} \
-build-benchmark -build-test -use-static-build -nc ${{ matrix.extra_flags }}
./tools/build --variant server --arch ${{ matrix.arch }} \
--system linux --subsystem openwrt --sysroot ${{ env.SDK_ROOT }} \
-build-benchmark -build-test -use-static-build -nc ${{ matrix.extra_flags }}
- name: Run tests (x86 and x86_64)
if: ${{ matrix.arch_name == 'x86' || matrix.arch_name == 'x86_64' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion third_party/boringssl/src
4 changes: 3 additions & 1 deletion tools/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,9 @@ func buildStageGenerateBuildScript() {
cmakeArgs = append(cmakeArgs, "-DUSE_TCMALLOC=on")
} else if subsystem == "musl" {
cmakeArgs = append(cmakeArgs, "-DUSE_TCMALLOC=off")
cmakeArgs = append(cmakeArgs, "-DUSE_MIMALLOC=on")
// mimalloc calls madvise internally while
// some old system doesn't like it.
cmakeArgs = append(cmakeArgs, "-DUSE_MIMALLOC=off")
} else {
cmakeArgs = append(cmakeArgs, "-DUSE_TCMALLOC=off")
cmakeArgs = append(cmakeArgs, "-DUSE_MIMALLOC=off")
Expand Down

0 comments on commit 200b76e

Please sign in to comment.