mirror of
https://github.com/fmtlib/fmt.git
synced 2026-10-29 02:17:28 +08:00
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.
This commit is contained in:
parent
615acd84dd
commit
7a3b442edc
7
.github/workflows/linux.yml
vendored
7
.github/workflows/linux.yml
vendored
@ -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}} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user