fix(jemalloc)

This commit is contained in:
Jacob Heider 2024-05-15 16:59:43 -04:00 committed by Jacob Heider
parent 118fdcc7d1
commit e00f3ec757

View file

@ -9,10 +9,21 @@ build:
dependencies: dependencies:
gnu.org/autoconf: '*' gnu.org/autoconf: '*'
docbook.org: '*' docbook.org: '*'
script: | script:
./configure $ARGS - ./configure $ARGS
make --jobs {{ hw.concurrency }} - make --jobs {{ hw.concurrency }}
make install - make install
- run: |
mv jemalloc/* .
rmdir jemalloc
ln -s . jemalloc
working-directory: ${{prefix}}/include
# jemalloc has a long-running issue on clang
# https://github.com/jemalloc/jemalloc/issues/1557
- run: sed -i 's/defined(JEMALLOC_USE_CXX_THROW)/defined(JEMALLOC_USE_CXX_THROW) \&\& \!defined(__clang__)/g' jemalloc.h
working-directory: ${{prefix}}/include
if: linux
env: env:
ARGS: ARGS:
- --prefix="{{prefix}}" - --prefix="{{prefix}}"
@ -20,6 +31,5 @@ build:
- --with-jemalloc-prefix= - --with-jemalloc-prefix=
test: test:
script: | - cc test.c -L {{prefix}}/lib -ljemalloc -o test
cc test.c -L {{prefix}}/lib -ljemalloc -o test - ./test
./test