compiler: Allow configuring UBSan mode at the module level.

* Accept -fsanitize-c=trap|full in addition to the existing form.
* Accept -f(no-)sanitize-trap=undefined in zig cc.
* Change type of std.Build.Module.sanitize_c to std.zig.SanitizeC.
* Add some missing Compilation.Config fields to the cache.

Closes #23216.
This commit is contained in:
Alex Rønne Petersen
2025-04-16 02:44:55 +02:00
parent 23440fbb99
commit b3537d0f4a
15 changed files with 176 additions and 57 deletions

View File

@@ -288,6 +288,14 @@ const known_options = [_]KnownOpt{
.name = "fno-sanitize",
.ident = "no_sanitize",
},
.{
.name = "fsanitize-trap",
.ident = "sanitize_trap",
},
.{
.name = "fno-sanitize-trap",
.ident = "no_sanitize_trap",
},
.{
.name = "T",
.ident = "linker_script",