| ... | @@ -173,15 +173,21 @@ pub const Options = struct { | ... | @@ -173,15 +173,21 @@ pub const Options = struct { |
| 173 | /// stack traces will just print an error to the relevant `Io.Writer` and return. | 173 | /// stack traces will just print an error to the relevant `Io.Writer` and return. |
| 174 | allow_stack_tracing: bool = !@import("builtin").strip_debug_info, | 174 | allow_stack_tracing: bool = !@import("builtin").strip_debug_info, |
| 175 | | 175 | |
| 176 | elf_debug_info_search_paths: ?fn (exe_path: []const u8) switch (@import("builtin").object_format) { | 176 | /// TODO This is a separate decl instead of a field as a workaround around |
| | 177 | /// compilation errors due to zig not being lazy enough. |
| | 178 | pub const elf_debug_info_search_paths: ?fn (exe_path: []const u8) switch (@import("builtin").object_format) { |
| 177 | .elf => debug.ElfFile.DebugInfoSearchPaths, | 179 | .elf => debug.ElfFile.DebugInfoSearchPaths, |
| 178 | else => void, | 180 | else => void, |
| 179 | } = null, | 181 | } = if (@hasDecl(root, "std_options_elf_debug_info_search_paths")) |
| | 182 | root.std_options_elf_debug_info_search_paths |
| | 183 | else |
| | 184 | null; |
| 180 | | 185 | |
| 181 | pub const debug_threaded_io: ?*Io.Threaded = if (@hasDecl(root, "std_options_debug_threaded_io")) | 186 | pub const debug_threaded_io: ?*Io.Threaded = if (@hasDecl(root, "std_options_debug_threaded_io")) |
| 182 | root.std_options_debug_threaded_io | 187 | root.std_options_debug_threaded_io |
| 183 | else | 188 | else |
| 184 | Io.Threaded.global_single_threaded; | 189 | Io.Threaded.global_single_threaded; |
| | 190 | |
| 185 | /// The `Io` instance that `std.debug` uses for `std.debug.print`, | 191 | /// The `Io` instance that `std.debug` uses for `std.debug.print`, |
| 186 | /// capturing stack traces, loading debug info, finding the executable's | 192 | /// capturing stack traces, loading debug info, finding the executable's |
| 187 | /// own path, and environment variables that affect terminal mode | 193 | /// own path, and environment variables that affect terminal mode |