diff options
-rw-r--r-- | .github/workflows/release-qt5.yml | 19 | ||||
-rw-r--r-- | .github/workflows/release.yml | 19 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | third_party/CMakeLists.txt | 32 |
4 files changed, 45 insertions, 29 deletions
diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml index ef6eb4a2..09bd2556 100644 --- a/.github/workflows/release-qt5.yml +++ b/.github/workflows/release-qt5.yml @@ -137,6 +137,25 @@ jobs: cd ${{github.workspace}} if: matrix.os == 'ubuntu-20.04' + - name: Build mimalloc (Linux) + run: | + cd ${{github.workspace}}/third_party/mimalloc + mkdir build && cd build + cmake -G Ninja -DMI_SECURE=ON .. + ninja + sudo ninja install + if: matrix.os == 'ubuntu-20.04' + + - name: Build mimalloc (Windows) + shell: msys2 {0} + run: | + cd ${{github.workspace}}/third_party/mimalloc + mkdir build && cd build + cmake -G Ninja -DMI_SECURE=ON .. + ninja + sudo ninja install + if: matrix.os == 'windows-2019' + - name: Configure CMake & Build Binary(Windows) shell: msys2 {0} run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c39be12..bc894ea0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -165,6 +165,25 @@ jobs: cd ${{github.workspace}} if: matrix.os == 'windows-2019' + - name: Build mimalloc (Linux) + run: | + cd ${{github.workspace}}/third_party/mimalloc + mkdir build && cd build + cmake -G Ninja -DMI_SECURE=ON .. + ninja + sudo ninja install + if: matrix.os == 'ubuntu-20.04' + + - name: Build mimalloc (Windows) + shell: msys2 {0} + run: | + cd ${{github.workspace}}/third_party/mimalloc + mkdir build && cd build + cmake -G Ninja -DMI_SECURE=ON .. + ninja + sudo ninja install + if: matrix.os == 'windows-2019' + - name: Build & Install Full SDK run: | cmake -B ${{github.workspace}}/build-full-sdk -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_FULL_SDK=ON diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 723cf364..c25d1fb1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,7 +56,9 @@ endif() find_package(OpenSSL REQUIRED) # mimalloc -find_package(mimalloc REQUIRED) +if(NOT APPLE) + find_package(mimalloc REQUIRED) +endif() # Set Build Information configure_file(${CMAKE_SOURCE_DIR}/src/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/src/GpgFrontend.h @ONLY) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 876cf46d..d830b446 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -23,34 +23,10 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -# json -set(JSON_BuildTests OFF CACHE INTERNAL "") - -# full sdk build on windows will use system installed libarchive -if(MINGW AND NOT STABLE_BUILD_FULL_SDK) - add_subdirectory(libarchive EXCLUDE_FROM_ALL) -endif() - -if(NOT APPLE) - set(MI_SECURE ON) - - # fix the segment fault issue on M1 chip platform - # refer to https://github.com/microsoft/mimalloc/issues/343 - # if(APPLE) - # set(MI_OSX_ZONE ON) - # set(MI_OSX_INTERPOSE OFF) - # endif() - - # ASAN checking - if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND ENABLE_ASAN) - # if(APPLE) - # set(MI_OVERRIDE OFF) - # endif() - - # set(MI_TRACK_VALGRIND ON) - set(MI_TRACK_ASAN ON) - endif() - +# ASAN checking +if(ENABLE_ASAN AND NOT APPLE AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + # set(MI_TRACK_VALGRIND ON) + set(MI_TRACK_ASAN ON) add_subdirectory(mimalloc EXCLUDE_FROM_ALL) endif() |