diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2025-02-27 08:36:47 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-03-09 18:06:14 -0400 |
commit | e629d191b99119c360605b056b954fff0905c83f (patch) | |
tree | d8120f57b96f0d8c854c2f3a653ee62e6808209a /docs/markdown/snippets | |
parent | 42a8cfc32b71b0d0c8c75e1337482b4a86922efa (diff) | |
download | meson-e629d191b99119c360605b056b954fff0905c83f.zip meson-e629d191b99119c360605b056b954fff0905c83f.tar.gz meson-e629d191b99119c360605b056b954fff0905c83f.tar.bz2 |
compilers: check for sanitizer arguments via a compiler check
The `b_sanitize` option is used to specify which sanitizers to use. This
option is implemented as a combo option, where it only allows a specific
set of hardcoded choices. This implementation isn't quite scalable:
- The number of available sanitizers is steadily growing, so we have
to always catch up with what sanitizers exist out there.
- Sanitizers can be combined more freely nowadays, but we only allow
to combine the "address" and "undefined" sanitizers.
- A hardcoded list is not a good match given that a choice existing as
an option does not mean that it is supported by the compiler in the
first place.
Instead of hardcoding available options, it is way more future proof to
instead allow arbitrary values and perform a compiler check. This makes
us support new sanitizers readily while also providing good feedback to
our users why a specific option might not be allowed.
Implement the compiler checks for sanitizers as a first step. Note that
this does not yet loosen the set of allowed sanitizers as we only accept
hardcoded values as specified by the combo option. This restriction will
be lifted in the next commit.
Diffstat (limited to 'docs/markdown/snippets')
0 files changed, 0 insertions, 0 deletions