aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-07-25 18:52:39 -0700
committerGitHub <noreply@github.com>2024-07-25 18:52:39 -0700
commitafddfe25d80ee4db930ba746f25264286af6d325 (patch)
tree13c7fa62cbe65047da0cd109784ef417e92bd6ae /src/main.zig
parent1c35e73b614398529782f8c027366c6d8d51ac4b (diff)
parent688c2df6464bd10a2dcfdf49e89c313e01da9991 (diff)
downloadzig-afddfe25d80ee4db930ba746f25264286af6d325.tar.gz
zig-afddfe25d80ee4db930ba746f25264286af6d325.zip
Merge pull request #20773 from ziglang/fuzz
integrate fuzz testing into the build system
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index 9940312bcd..ddd2e79f44 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -655,6 +655,7 @@ const usage_build_generic =
\\ --debug-log [scope] Enable printing debug/info log messages for scope
\\ --debug-compile-errors Crash with helpful diagnostics at the first compile error
\\ --debug-link-snapshot Enable dumping of the linker's state in JSON format
+ \\ --debug-rt Debug compiler runtime libraries
\\
;
@@ -912,6 +913,7 @@ fn buildOutputType(
var minor_subsystem_version: ?u16 = null;
var mingw_unicode_entry_point: bool = false;
var enable_link_snapshots: bool = false;
+ var debug_compiler_runtime_libs = false;
var opt_incremental: ?bool = null;
var install_name: ?[]const u8 = null;
var hash_style: link.File.Elf.HashStyle = .both;
@@ -1367,6 +1369,8 @@ fn buildOutputType(
} else {
enable_link_snapshots = true;
}
+ } else if (mem.eql(u8, arg, "--debug-rt")) {
+ debug_compiler_runtime_libs = true;
} else if (mem.eql(u8, arg, "-fincremental")) {
dev.check(.incremental);
opt_incremental = true;
@@ -3408,6 +3412,7 @@ fn buildOutputType(
// noise when --search-prefix and --mod are combined.
.global_cc_argv = try cc_argv.toOwnedSlice(arena),
.file_system_inputs = &file_system_inputs,
+ .debug_compiler_runtime_libs = debug_compiler_runtime_libs,
}) catch |err| switch (err) {
error.LibCUnavailable => {
const triple_name = try target.zigTriple(arena);