Skip to content

Commit

Permalink
[ci] Replace mimalloc with snmalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Oct 28, 2024
1 parent b37ba6b commit 0e54fb1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
7 changes: 0 additions & 7 deletions 3rdparty/mimalloc.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
if(SCORE_USE_SYSTEM_LIBRARIES)
find_package(snmalloc GLOBAL CONFIG)
else()

block()
set(SNMALLOC_BUILD_TESTING OFF CACHE INTERNAL "" FORCE)
add_subdirectory(3rdparty/snmalloc SYSTEM)
endblock()
#
# if(TARGET mimalloc)
# set_target_properties(mimalloc PROPERTIES UNITY_BUILD 0)
# elseif(TARGET mimalloc-static)
# set_target_properties(mimalloc-static PROPERTIES UNITY_BUILD 0)
# endif()
endif()
8 changes: 5 additions & 3 deletions ci/bookworm.deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

source ci/common.setup.sh

wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19

# libsdl2-dev libsdl2-2.0-0
$SUDO apt-get update -qq
$SUDO apt-get install -qq --force-yes \
binutils gcc g++ clang clang-15 cmake \
binutils gcc g++ cmake \
libasound-dev \
ninja-build \
libfftw3-dev \
libsuil-dev liblilv-dev lv2-dev \
libclang-dev llvm-dev \
libclang-15-dev llvm-15-dev \
libdbus-1-dev \
libdrm-dev libgbm-dev \
qt6-base-dev qt6-base-dev-tools qt6-base-private-dev \
Expand Down
5 changes: 3 additions & 2 deletions cmake/ScoreConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ if(CMAKE_UNITY_BUILD)
set(SCORE_PCH 0)
endif()

if(CMAKE_VERSION VERSION_LESS 3.17)
set(SCORE_PCH 0)
check_cxx_compiler_flag("-Werror -Wextra -Wall -mcx16" has_mcx16_flag)
if(has_mcx16_flag)
add_compile_options(-mcx16)
endif()

# Commit and version information
Expand Down
12 changes: 2 additions & 10 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,10 @@ target_link_libraries(${APPNAME}

if(SCORE_STATIC_PLUGINS)
target_link_libraries(${APPNAME} PUBLIC ${SCORE_PLUGINS_LIST})
set(SCORE_MIMALLOC_TARGET mimalloc-static)
else()
set(SCORE_MIMALLOC_TARGET mimalloc)
endif()

if(NOT asan IN_LIST CNINJA_FEATURES)
# disable mimalloc until we find out why it causes jack to be stuck..;
# if(NOT CMAKE_SYSTEM_NAME MATCHES Emscripten)
# target_link_libraries(${APPNAME} PUBLIC
# $<LINK_ONLY:${SCORE_MIMALLOC_TARGET}>
# )
# endif()
if(TARGET snmalloc)
target_link_libraries(${APPNAME} PUBLIC snmalloc)
endif()

target_compile_definitions(${APPNAME} PUBLIC
Expand Down

0 comments on commit 0e54fb1

Please sign in to comment.