authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-26 18:25:53-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-01 19:49:07-07:00
logbeed47e8c3792abf87529c705726d9745546648e
tree7e7ed0db544e5ca90ec8701392961a512fc16953
parent190f6038bfca5e6239635cfeebd87d67d2501ea3

std.Build: add error_tracing field to addExecutable and friends

To support easily overriding error return tracing for the main module.

1 files changed, 10 insertions(+), 0 deletions(-)

lib/std/Build.zig+10
......@@ -607,6 +607,7 @@ pub const ExecutableOptions = struct {
607607 unwind_tables: ?bool = null,
608608 omit_frame_pointer: ?bool = null,
609609 sanitize_thread: ?bool = null,
610 error_tracing: ?bool = null,
610611 use_llvm: ?bool = null,
611612 use_lld: ?bool = null,
612613 zig_lib_dir: ?LazyPath = null,
......@@ -632,6 +633,7 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile {
632633 .unwind_tables = options.unwind_tables,
633634 .omit_frame_pointer = options.omit_frame_pointer,
634635 .sanitize_thread = options.sanitize_thread,
636 .error_tracing = options.error_tracing,
635637 },
636638 .version = options.version,
637639 .kind = .exe,
......@@ -659,6 +661,7 @@ pub const ObjectOptions = struct {
659661 unwind_tables: ?bool = null,
660662 omit_frame_pointer: ?bool = null,
661663 sanitize_thread: ?bool = null,
664 error_tracing: ?bool = null,
662665 use_llvm: ?bool = null,
663666 use_lld: ?bool = null,
664667 zig_lib_dir: ?LazyPath = null,
......@@ -678,6 +681,7 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile {
678681 .unwind_tables = options.unwind_tables,
679682 .omit_frame_pointer = options.omit_frame_pointer,
680683 .sanitize_thread = options.sanitize_thread,
684 .error_tracing = options.error_tracing,
681685 },
682686 .kind = .obj,
683687 .max_rss = options.max_rss,
......@@ -703,6 +707,7 @@ pub const SharedLibraryOptions = struct {
703707 unwind_tables: ?bool = null,
704708 omit_frame_pointer: ?bool = null,
705709 sanitize_thread: ?bool = null,
710 error_tracing: ?bool = null,
706711 use_llvm: ?bool = null,
707712 use_lld: ?bool = null,
708713 zig_lib_dir: ?LazyPath = null,
......@@ -728,6 +733,7 @@ pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile
728733 .unwind_tables = options.unwind_tables,
729734 .omit_frame_pointer = options.omit_frame_pointer,
730735 .sanitize_thread = options.sanitize_thread,
736 .error_tracing = options.error_tracing,
731737 },
732738 .kind = .lib,
733739 .linkage = .dynamic,
......@@ -756,6 +762,7 @@ pub const StaticLibraryOptions = struct {
756762 unwind_tables: ?bool = null,
757763 omit_frame_pointer: ?bool = null,
758764 sanitize_thread: ?bool = null,
765 error_tracing: ?bool = null,
759766 use_llvm: ?bool = null,
760767 use_lld: ?bool = null,
761768 zig_lib_dir: ?LazyPath = null,
......@@ -775,6 +782,7 @@ pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile
775782 .unwind_tables = options.unwind_tables,
776783 .omit_frame_pointer = options.omit_frame_pointer,
777784 .sanitize_thread = options.sanitize_thread,
785 .error_tracing = options.error_tracing,
778786 },
779787 .kind = .lib,
780788 .linkage = .static,
......@@ -802,6 +810,7 @@ pub const TestOptions = struct {
802810 unwind_tables: ?bool = null,
803811 omit_frame_pointer: ?bool = null,
804812 sanitize_thread: ?bool = null,
813 error_tracing: ?bool = null,
805814 use_llvm: ?bool = null,
806815 use_lld: ?bool = null,
807816 zig_lib_dir: ?LazyPath = null,
......@@ -822,6 +831,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
822831 .unwind_tables = options.unwind_tables,
823832 .omit_frame_pointer = options.omit_frame_pointer,
824833 .sanitize_thread = options.sanitize_thread,
834 .error_tracing = options.error_tracing,
825835 },
826836 .max_rss = options.max_rss,
827837 .filter = options.filter,