Skip to content

Commit

Permalink
mingw: disable tcmalloc for emulated tls build
Browse files Browse the repository at this point in the history
Fixes #1127.
  • Loading branch information
Chilledheart committed Oct 21, 2024
1 parent ace302e commit cbe7e97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/releases-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
REM start to build with workaround
mkdir build-mingw
cd build-mingw
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_BENCHMARKS=on -DBUILD_TESTS=on -DGUI=on -DMINGW_MSVCRT100=on -DMINGW_WORKAROUND=on .. ${{ env.CMAKE_OPTIONS }} -DCMAKE_C_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_CXX_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_ASM_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_SYSROOT="%CD%\..\third_party\${{ matrix.mingw_dir }}\${{ matrix.arch }}-w64-mingw32" -DUSE_TCMALLOC=on -DUSE_LIBCXX=on -DENABLE_LLD=on -DUSE_ZLIB=on -DUSE_JSONCPP=on -DUSE_CARES=on
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_BENCHMARKS=on -DBUILD_TESTS=on -DGUI=on -DMINGW_MSVCRT100=on -DMINGW_WORKAROUND=on .. ${{ env.CMAKE_OPTIONS }} -DCMAKE_C_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_CXX_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_ASM_COMPILER_TARGET=${{ matrix.arch }}-pc-windows-gnu -DCMAKE_SYSROOT="%CD%\..\third_party\${{ matrix.mingw_dir }}\${{ matrix.arch }}-w64-mingw32" -DUSE_LIBCXX=on -DENABLE_LLD=on -DUSE_ZLIB=on -DUSE_JSONCPP=on -DUSE_CARES=on
ninja yass yass_benchmark yass_test
- name: Populate depedencies (libgcc-i686)
if: ${{ matrix.arch == 'i686' }}
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,10 @@ if (USE_LIBCXX)
list(APPEND YASS_APP_FEATURES "msvcrt100")
endif()
if (MINGW_WORKAROUND)
if (USE_TCMALLOC)
# see #1127 mingw emutls patch crashes in 32-bit windows
message(FATAL_ERROR "mingw emutls workaround doesn't work with tcmalloc")
endif()
list(APPEND YASS_APP_FEATURES "mingw atexit workaround")
endif()
elseif(LINUX AND ENABLE_ASSERTIONS)
Expand Down

0 comments on commit cbe7e97

Please sign in to comment.