Skip to content

Commit 0933b4d

Browse files
committed
ci: add clang ASan job
1 parent 3fd05bb commit 0933b4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
latest-factors: |
4343
msvc Optimized-Debug
4444
gcc UBSan Coverage
45-
clang UBSan
45+
clang UBSan ASan
4646
factors: ''
4747
runs-on: |
4848
apple-clang: macos-15
@@ -75,6 +75,8 @@ jobs:
7575
llvm-root: ../third-party/llvm-project/install
7676
llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
7777
llvm-archive-filename: {{{ llvm-archive-basename }}}.{{{ llvm-archive-extension }}}
78+
# The LLVM_USE_SANITIZER option only supports Clang.
79+
llvm-sanizizer-config: {{#if (ne compiler 'clang')}}{{else if ubsan}}Undefined{{else if asan}}Address{{/if}}
7880
mrdocs-ccflags: {{{ ccflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
7981
mrdocs-cxxflags: {{{ cxxflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
8082
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
@@ -264,7 +266,7 @@ jobs:
264266
# The UBSan vptr sanitizer needs RTTI.
265267
${{ matrix.ubsan && '-DLLVM_ENABLE_RTTI=ON' }}
266268
# The LLVM_USE_SANITIZER option doesn't support GCC.
267-
${{ !matrix.compiler == 'gcc' && matrix.ubsan && '-DLLVM_USE_SANITIZER=Undefined' }}
269+
-DLLVM_USE_SANITIZER=${{ matrix.llvm-sanitizer-config }}
268270
cc: ${{ steps.setup-cpp.outputs.cc }}
269271
cxx: ${{ steps.setup-cpp.outputs.cxx }}
270272
generator: Ninja

0 commit comments

Comments
 (0)