From 7a3b442edc02cb45dbe60e7eaf2068356eb3f525 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 16 Oct 2026 12:44:14 -0700 Subject: [PATCH] Simplify sanitizer flags in Linux CI workflow Inline the SANITIZER_FLAGS expression into CXXFLAGS and drop CFLAGS. c-test is the only C target and CMake links it with the C++ driver because it depends on fmt-c, so the sanitizer runtime is still linked in. --- .github/workflows/linux.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 550224bf..22ee33a6 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -19,8 +19,6 @@ jobs: # there is no need for timedatectl, which fails without systemd-timedated. TZ: Europe/Kyiv GTEST_DEATH_TEST_USE_FORK: ${{ matrix.sanitizers && startsWith(matrix.cxx, 'g++') && '1' || '0' }} - SANITIZER_FLAGS: >- - ${{ matrix.sanitizers && '-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all' || '' }} strategy: matrix: cxx: [g++-4.9, g++-11, clang++-3.6, clang++-11] @@ -204,8 +202,9 @@ jobs: working-directory: ${{runner.workspace}}/build env: CXX: ${{matrix.cxx}} - CFLAGS: ${{env.SANITIZER_FLAGS}} - CXXFLAGS: ${{matrix.cxxflags}} ${{env.SANITIZER_FLAGS}} + CXXFLAGS: >- + ${{matrix.cxxflags}} + ${{ matrix.sanitizers && '-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all' || '' }} run: | cmake ${{matrix.gen && '-G' || ''}} ${{matrix.gen}} \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \