summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Builtin-options.md18
-rw-r--r--docs/markdown/snippets/b_sanitizer_changes.md17
2 files changed, 31 insertions, 4 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index ffbab47d8..e1686f8d2 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -231,10 +231,20 @@ available on all platforms or with all compilers:
| b_pie | false | true, false | Build position-independent executables (since 0.49.0) |
| b_vscrt | from_buildtype | none, md, mdd, mt, mtd, from_buildtype, static_from_buildtype | VS runtime library to use (since 0.48.0) (static_from_buildtype since 0.56.0) |
-The value of `b_sanitize` can be one of: `none`, `address`, `thread`,
-`undefined`, `memory`, `leak`, `address,undefined`, but note that some
-compilers might not support all of them. For example Visual Studio
-only supports the address sanitizer.
+The default and possible values of sanitizers changed in 1.8. Before 1.8 they
+were string values, and restricted to a specific subset of values: `none`,
+`address`, `thread`, `undefined`, `memory`, `leak`, or `address,undefined`. In
+1.8 it was changed to a free form array of sanitizers, which are checked by a
+compiler and linker check. For backwards compatibility reasons
+`get_option('b_sanitize')` continues to return a string with the array values
+separated by a comma. Furthermore:
+
+ - If the `b_sanitize` option is empty, the `'none'` string is returned.
+
+ - If it contains only the values `'address'` and `'undefined'`, they are
+ always returned as the `'address,undefined'` string, in this order.
+
+ - Otherwise, the array elements are returned in undefined order.
\* < 0 means disable, == 0 means automatic selection, > 0 sets a specific number to use
diff --git a/docs/markdown/snippets/b_sanitizer_changes.md b/docs/markdown/snippets/b_sanitizer_changes.md
new file mode 100644
index 000000000..f726d700a
--- /dev/null
+++ b/docs/markdown/snippets/b_sanitizer_changes.md
@@ -0,0 +1,17 @@
+## Changes to the b_sanitize option
+
+Before 1.8 the `b_sanitize` option was a combo option, which is an enumerated
+set of values. In 1.8 this was changed to a free-form array of options where
+available sanitizers are not hardcoded anymore but instead verified via a
+compiler check.
+
+This solves a number of longstanding issues such as:
+
+ - Sanitizers may be supported by a compiler, but not on a specific platform
+ (OpenBSD).
+ - New sanitizers are not recognized by Meson.
+ - Using sanitizers in previously-unsupported combinations.
+
+To not break backwards compatibility, calling `get_option('b_sanitize')`
+continues to return the configured value as a string, with a guarantee that
+`address,undefined` remains ordered.