diff --git a/.github/workflows/sanitizers-cmake.yml b/.github/workflows/sanitizers-cmake.yml index e3c5ff87638..deda8b0070b 100644 --- a/.github/workflows/sanitizers-cmake.yml +++ b/.github/workflows/sanitizers-cmake.yml @@ -25,7 +25,7 @@ jobs: working-directory: ${{github.workspace}}/build run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEBUG_MEMORY=${{ matrix.sanitizer }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ - cmake --build . --parallel + cmake --build . -j2 - name: Run working-directory: ${{github.workspace}}/build @@ -51,7 +51,7 @@ jobs: working-directory: ${{github.workspace}}/build run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MEMORY=${{ matrix.sanitizer }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ - cmake --build . --parallel + cmake --build . -j2 - name: Run working-directory: ${{github.workspace}}/build @@ -77,7 +77,7 @@ jobs: working-directory: ${{github.workspace}}/build run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEBUG_MEMORY=${{ matrix.sanitizer }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - cmake --build . --parallel + cmake --build . -j2 - name: Run working-directory: ${{github.workspace}}/build @@ -103,7 +103,7 @@ jobs: working-directory: ${{github.workspace}}/build run: | cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MEMORY=${{ matrix.sanitizer }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - cmake --build . --parallel + cmake --build . -j2 - name: Run working-directory: ${{github.workspace}}/build diff --git a/CMakeLists.txt b/CMakeLists.txt index f28998adb01..6892f02f363 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -400,6 +400,11 @@ if (BUILD_CXX) message(STATUS "IPO / LTO is not supported for 32-bit linux.") endif() + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE) + message(STATUS "IPO / LTO: disabled for Debug build") + endif() + endif()