Skip to content

Commit 2af40e1

Browse files
committed
ci: add asan clang Linux job
1 parent fa3a347 commit 2af40e1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 4 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
apple-clang UBSan ASan
4747
factors: ''
4848
runs-on: |
@@ -76,9 +76,11 @@ jobs:
7676
llvm-root: ../third-party/llvm-project/install
7777
llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
7878
llvm-archive-filename: {{{ llvm-archive-basename }}}.{{{ llvm-archive-extension }}}
79-
llvm-sanitizer-config: {{#if (or (ne compiler 'clang') (ne compiler 'apple-clang'))}}{{else if ubsan}}Undefined{{else if asan}}Address{{/if}}
80-
mrdocs-ccflags: {{{ ccflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
81-
mrdocs-cxxflags: {{{ cxxflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
79+
llvm-sanitizer-config: {{#if (and (ne compiler 'clang') (ne compiler 'apple-clang'))}}{{else if ubsan}}Undefined{{else if asan}}Address{{else if msan}}MemoryWithOrigins{{/if}}
80+
mrdocs-flags: {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}{{#if (and (eq compiler 'clang') msan) }}-fsanitize-memory-track-origins{{/if}}
81+
mrdocs-ccflags: {{{ ccflags }}} {{{ mrdocs-flags }}}
82+
mrdocs-cxxflags: {{{ cxxflags }}} {{{ mrdocs-flags }}}
83+
mrdocs-linkflags: {{#if asan }}-fsanitize=address{{/if}}
8284
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
8385
mrdocs-release-package-artifact: release-packages-{{{ lowercase os }}}
8486
output-file: matrix.json
@@ -279,6 +281,8 @@ jobs:
279281
-DLLVM_USE_SANITIZER=${{ matrix.llvm-sanitizer-config }}
280282
cc: ${{ steps.setup-cpp.outputs.cc }}
281283
cxx: ${{ steps.setup-cpp.outputs.cxx }}
284+
ccflags: -gz=zstd
285+
cxxflags: -gz=zstd
282286
generator: Ninja
283287
install: true
284288
install-prefix: ${sourceDir}/../install
@@ -378,6 +382,7 @@ jobs:
378382
install-prefix: .local
379383
extra-args: |
380384
-D MRDOCS_BUILD_DOCS=OFF
385+
-D CMAKE_EXE_LINKER_FLAGS=${{ matrix.mrdocs-linkflags }}
381386
-D LLVM_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/llvm-project/install
382387
-D Clang_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/llvm-project/install
383388
-D duktape_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/duktape/install

0 commit comments

Comments
 (0)