aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-02-27 01:31:09 -0500
committerGitHub <noreply@github.com>2025-02-27 01:31:09 -0500
commitdea72d15da4fba909dc3ccb2e9dc5286372ac023 (patch)
treedaea2909e476467396347897bc12b13ae2a37ff7 /src/main.zig
parentab381933c87bcc744058d25a876cfdc0d23fc674 (diff)
parent43a949ee95ce72003bb2d2ee22e1f4b5aea96739 (diff)
downloadzig-dea72d15da4fba909dc3ccb2e9dc5286372ac023.tar.gz
zig-dea72d15da4fba909dc3ccb2e9dc5286372ac023.zip
Merge pull request #22898 from kristoff-it/deprecated-proposal
Implement `@deprecated`
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index 5e66244484..ed862b03a0 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -520,6 +520,8 @@ const usage_build_generic =
\\ -fno-sanitize-thread Disable Thread Sanitizer
\\ -ffuzz Enable fuzz testing instrumentation
\\ -fno-fuzz Disable fuzz testing instrumentation
+ \\ -fallow-deprecated Allow usage of deprecated code
+ \\ -fno-allow-deprecated Disallow usage of deprecated code
\\ -funwind-tables Always produce unwind table entries for all functions
\\ -fasync-unwind-tables Always produce asynchronous unwind table entries for all functions
\\ -fno-unwind-tables Never produce unwind table entries
@@ -1454,6 +1456,10 @@ fn buildOutputType(
mod_opts.fuzz = true;
} else if (mem.eql(u8, arg, "-fno-fuzz")) {
mod_opts.fuzz = false;
+ } else if (mem.eql(u8, arg, "-fallow-deprecated")) {
+ mod_opts.allow_deprecated = true;
+ } else if (mem.eql(u8, arg, "-fno-allow-deprecated")) {
+ mod_opts.allow_deprecated = false;
} else if (mem.eql(u8, arg, "-fllvm")) {
create_module.opts.use_llvm = true;
} else if (mem.eql(u8, arg, "-fno-llvm")) {