Skip to content

Commit 2ab1dad

Browse files
XueSongTapderSteFfi
authored andcommitted
fix: Update DieHard build to use CMake and correct library path (daanx#223)
* fix: Update DieHard build to use CMake and correct library path Signed-off-by: yexiaochuan <tap91624@gmail.com>
1 parent e46aac2 commit 2ab1dad

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ readonly lib_tbb="$localdevdir/tbb/bench_release/libtbbmalloc_proxy$extso"
9898
readonly lib_tbb_dir="$(dirname $lib_tbb)"
9999

100100

101-
alloc_lib_add "dh" "$localdevdir/dh/src/libdieharder$extso"
101+
alloc_lib_add "dh" "$localdevdir/dh/src/build/libdieharder$extso"
102102
alloc_lib_add "ff" "$localdevdir/ff/libffmallocnpmt$extso"
103103
alloc_lib_add "fg" "$localdevdir/fg/libfreeguard$extso"
104104
alloc_lib_add "gd" "$localdevdir/gd/libguarder$extso"

build-bench-env.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rebuild=0
3737
all=0
3838

3939
# allocator versions
40-
readonly version_dh=640949fe0128d9c7013677c8c332698d5c2cefc2 # last unmaintained version, see https://github.com/daanx/mimalloc-bench/issues/222 for the up-to-date one
40+
readonly version_dh=master
4141
readonly version_ff=master # ~unmaintained since 2021
4242
readonly version_fg=master # ~unmaintained since 2018
4343
readonly version_gd=master # ~unmaintained since 2021
@@ -572,11 +572,10 @@ if test "$setup_dh" = "1"; then
572572
checkout dh $version_dh https://github.com/emeryberger/DieHard
573573
# remove all the historical useless junk
574574
rm -rf ./benchmarks/ ./src/archipelago/ ./src/build/ ./src/exterminator/ ./src/local/ ./src/original-diehard/ ./src/replicated/ ./docs
575-
if test "$darwin" = "1"; then
576-
TARGET=libdieharder make -C src macos
577-
else
578-
TARGET=libdieharder make -C src linux-gcc-64
579-
fi
575+
cd src
576+
cmake -S . -B build
577+
cmake --build build -j `nproc`
578+
cd ../..
580579
popd
581580
fi
582581

0 commit comments

Comments
 (0)