41
41
standards : ' 20'
42
42
latest-factors : |
43
43
msvc Optimized-Debug
44
- gcc Coverage
44
+ gcc UBSan Coverage
45
+ clang UBSan
45
46
factors : ' '
46
47
runs-on : |
47
48
apple-clang: macos-15
@@ -65,21 +66,22 @@ jobs:
65
66
msvc: ''
66
67
extra-values : |
67
68
llvm-hash: dd7a3d4d798e30dfe53b5bbbbcd9a23c24ea1af9
68
- llvm-id: {{ substr llvm-hash 0 7 }}
69
- llvm-build-preset-prefix: {{#if optimized-debug}}debwithopt{{else}}{{lowercase build-type}}{{/if}}
69
+ llvm-id: {{{ substr llvm-hash 0 7 } }}
70
+ llvm-build-preset-prefix: {{#if optimized-debug}}debwithopt{{else}}{{{ lowercase build-type} }}{{/if}}
70
71
llvm-build-preset-suffix: {{#if (ieq os 'windows') }}win{{else}}unix{{/if}}
71
- llvm-build-preset: {{ llvm-build-preset-prefix }}-{{ llvm-build-preset-suffix }}
72
- llvm-compiler-key: {{ compiler }}-{{ version }}
73
- llvm-cache-key: llvm-libcxx-{{ lowercase os }}-{{ llvm-compiler-key }}-{{ llvm-build-preset-prefix }}-{{ llvm-hash }}
72
+ llvm-build-preset: {{{ llvm-build-preset-prefix }}} -{{{ llvm-build-preset-suffix } }}
73
+ llvm-compiler-key: {{{ compiler }}} -{{{ version } }}
74
+ llvm-cache-key: llvm-libcxx-{{{ lowercase os }}} -{{{ llvm-compiler-key }}} -{{{ llvm-build-preset-prefix }}} -{{{ ubsan }}}-{{{ asan }}}-{{{ msan }}}-{{{ llvm-hash } }}
74
75
llvm-root: ../third-party/llvm-project/install
75
- llvm-archive-basename: llvm-{{ os }}-{{ llvm-build-preset-prefix }}-{{ llvm-id }}
76
+ llvm-archive-basename: llvm-{{{ os }}} -{{{ llvm-build-preset-prefix }}} -{{{ llvm-id } }}
76
77
llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
77
- llvm-archive-filename: {{ llvm-archive-basename }}.{{ llvm-archive-extension }}
78
- mrdocs-ccflags: {{ ccflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan {{/if}}
79
- mrdocs-cxxflags: {{ cxxflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan {{/if}}
78
+ llvm-archive-filename: {{{ llvm-archive-basename }}} .{{{ llvm-archive-extension } }}
79
+ mrdocs-ccflags: {{{ ccflags }}} {{#if (and ( eq compiler 'gcc') (not asan)) }}-static{{/if}}
80
+ mrdocs-cxxflags: {{{ cxxflags }}} {{#if (and ( eq compiler 'gcc') (not asan)) }}-static{{/if}}
80
81
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
81
- mrdocs-release-package-artifact: release-packages-{{ lowercase os }}
82
+ mrdocs-release-package-artifact: release-packages-{{{ lowercase os } }}
82
83
output-file : matrix.json
84
+ trace-commands : true
83
85
84
86
# Set up the version as expected by the LLVM matrix script and @actions/core
85
87
- name : Setup Node.js
@@ -215,7 +217,7 @@ jobs:
215
217
216
218
- name : Download LLVM Binaries
217
219
id : llvm-download
218
- if : steps.llvm-cache.outputs.cache-hit != 'true'
220
+ if : steps.llvm-cache.outputs.cache-hit != 'true' && !(matrix.ubsan || matrix.asan || matrix.msan)
219
221
run : |
220
222
set -x
221
223
url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }}
@@ -260,6 +262,10 @@ jobs:
260
262
build-type : ${{ matrix.build-type }}
261
263
extra-args : |
262
264
${{ runner.os == 'Windows' && '-DLLVM_ENABLE_RUNTIMES=libcxx' || '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind' }}
265
+ # The UBSan vptr sanitizer needs RTTI.
266
+ ${{ matrix.ubsan && '-DLLVM_ENABLE_RTTI=ON' }}
267
+ # The LLVM_USE_SANITIZER option doesn't support GCC.
268
+ ${{ !matrix.compiler == 'gcc' && matrix.ubsan && '-DLLVM_USE_SANITIZER=Undefined' }}
263
269
cc : ${{ steps.setup-cpp.outputs.cc }}
264
270
cxx : ${{ steps.setup-cpp.outputs.cxx }}
265
271
generator : Ninja
0 commit comments