Skip to content

Commit 97eacc7

Browse files
Merge pull request #991 from ldorau/Build_custom_jemalloc_with_-j
Build custom jemalloc with -j$(nproc)
2 parents aef7ae7 + 397e5c4 commit 97eacc7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,13 @@ else()
161161
WORKING_DIRECTORY ${jemalloc_targ_SOURCE_DIR}
162162
OUTPUT ${jemalloc_targ_SOURCE_DIR}/Makefile
163163
DEPENDS ${jemalloc_targ_SOURCE_DIR}/configure)
164+
165+
if(NOT UMF_QEMU_BUILD)
166+
set(MAKE_ARGUMENTS "-j$(nproc)")
167+
endif()
168+
164169
add_custom_command(
165-
COMMAND make
170+
COMMAND make ${MAKE_ARGUMENTS}
166171
WORKING_DIRECTORY ${jemalloc_targ_SOURCE_DIR}
167172
OUTPUT ${jemalloc_targ_SOURCE_DIR}/lib/libjemalloc.a
168173
DEPENDS ${jemalloc_targ_SOURCE_DIR}/Makefile)

scripts/qemu/run-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cd build
2121

2222
cmake .. \
2323
-DCMAKE_BUILD_TYPE=Debug \
24+
-DUMF_QEMU_BUILD=1 \
2425
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON \
2526
-DUMF_BUILD_CUDA_PROVIDER=ON \
2627
-DUMF_FORMAT_CODE_STYLE=OFF \

0 commit comments

Comments
 (0)