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 {...@@ -607,6 +607,7 @@ pub const ExecutableOptions = struct {
607 unwind_tables: ?bool = null,607 unwind_tables: ?bool = null,
608 omit_frame_pointer: ?bool = null,608 omit_frame_pointer: ?bool = null,
609 sanitize_thread: ?bool = null,609 sanitize_thread: ?bool = null,
610 error_tracing: ?bool = null,
610 use_llvm: ?bool = null,611 use_llvm: ?bool = null,
611 use_lld: ?bool = null,612 use_lld: ?bool = null,
612 zig_lib_dir: ?LazyPath = null,613 zig_lib_dir: ?LazyPath = null,
...@@ -632,6 +633,7 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile {...@@ -632,6 +633,7 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile {
632 .unwind_tables = options.unwind_tables,633 .unwind_tables = options.unwind_tables,
633 .omit_frame_pointer = options.omit_frame_pointer,634 .omit_frame_pointer = options.omit_frame_pointer,
634 .sanitize_thread = options.sanitize_thread,635 .sanitize_thread = options.sanitize_thread,
636 .error_tracing = options.error_tracing,
635 },637 },
636 .version = options.version,638 .version = options.version,
637 .kind = .exe,639 .kind = .exe,
...@@ -659,6 +661,7 @@ pub const ObjectOptions = struct {...@@ -659,6 +661,7 @@ pub const ObjectOptions = struct {
659 unwind_tables: ?bool = null,661 unwind_tables: ?bool = null,
660 omit_frame_pointer: ?bool = null,662 omit_frame_pointer: ?bool = null,
661 sanitize_thread: ?bool = null,663 sanitize_thread: ?bool = null,
664 error_tracing: ?bool = null,
662 use_llvm: ?bool = null,665 use_llvm: ?bool = null,
663 use_lld: ?bool = null,666 use_lld: ?bool = null,
664 zig_lib_dir: ?LazyPath = null,667 zig_lib_dir: ?LazyPath = null,
...@@ -678,6 +681,7 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile {...@@ -678,6 +681,7 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile {
678 .unwind_tables = options.unwind_tables,681 .unwind_tables = options.unwind_tables,
679 .omit_frame_pointer = options.omit_frame_pointer,682 .omit_frame_pointer = options.omit_frame_pointer,
680 .sanitize_thread = options.sanitize_thread,683 .sanitize_thread = options.sanitize_thread,
684 .error_tracing = options.error_tracing,
681 },685 },
682 .kind = .obj,686 .kind = .obj,
683 .max_rss = options.max_rss,687 .max_rss = options.max_rss,
...@@ -703,6 +707,7 @@ pub const SharedLibraryOptions = struct {...@@ -703,6 +707,7 @@ pub const SharedLibraryOptions = struct {
703 unwind_tables: ?bool = null,707 unwind_tables: ?bool = null,
704 omit_frame_pointer: ?bool = null,708 omit_frame_pointer: ?bool = null,
705 sanitize_thread: ?bool = null,709 sanitize_thread: ?bool = null,
710 error_tracing: ?bool = null,
706 use_llvm: ?bool = null,711 use_llvm: ?bool = null,
707 use_lld: ?bool = null,712 use_lld: ?bool = null,
708 zig_lib_dir: ?LazyPath = null,713 zig_lib_dir: ?LazyPath = null,
...@@ -728,6 +733,7 @@ pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile...@@ -728,6 +733,7 @@ pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile
728 .unwind_tables = options.unwind_tables,733 .unwind_tables = options.unwind_tables,
729 .omit_frame_pointer = options.omit_frame_pointer,734 .omit_frame_pointer = options.omit_frame_pointer,
730 .sanitize_thread = options.sanitize_thread,735 .sanitize_thread = options.sanitize_thread,
736 .error_tracing = options.error_tracing,
731 },737 },
732 .kind = .lib,738 .kind = .lib,
733 .linkage = .dynamic,739 .linkage = .dynamic,
...@@ -756,6 +762,7 @@ pub const StaticLibraryOptions = struct {...@@ -756,6 +762,7 @@ pub const StaticLibraryOptions = struct {
756 unwind_tables: ?bool = null,762 unwind_tables: ?bool = null,
757 omit_frame_pointer: ?bool = null,763 omit_frame_pointer: ?bool = null,
758 sanitize_thread: ?bool = null,764 sanitize_thread: ?bool = null,
765 error_tracing: ?bool = null,
759 use_llvm: ?bool = null,766 use_llvm: ?bool = null,
760 use_lld: ?bool = null,767 use_lld: ?bool = null,
761 zig_lib_dir: ?LazyPath = null,768 zig_lib_dir: ?LazyPath = null,
...@@ -775,6 +782,7 @@ pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile...@@ -775,6 +782,7 @@ pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile
775 .unwind_tables = options.unwind_tables,782 .unwind_tables = options.unwind_tables,
776 .omit_frame_pointer = options.omit_frame_pointer,783 .omit_frame_pointer = options.omit_frame_pointer,
777 .sanitize_thread = options.sanitize_thread,784 .sanitize_thread = options.sanitize_thread,
785 .error_tracing = options.error_tracing,
778 },786 },
779 .kind = .lib,787 .kind = .lib,
780 .linkage = .static,788 .linkage = .static,
...@@ -802,6 +810,7 @@ pub const TestOptions = struct {...@@ -802,6 +810,7 @@ pub const TestOptions = struct {
802 unwind_tables: ?bool = null,810 unwind_tables: ?bool = null,
803 omit_frame_pointer: ?bool = null,811 omit_frame_pointer: ?bool = null,
804 sanitize_thread: ?bool = null,812 sanitize_thread: ?bool = null,
813 error_tracing: ?bool = null,
805 use_llvm: ?bool = null,814 use_llvm: ?bool = null,
806 use_lld: ?bool = null,815 use_lld: ?bool = null,
807 zig_lib_dir: ?LazyPath = null,816 zig_lib_dir: ?LazyPath = null,
...@@ -822,6 +831,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {...@@ -822,6 +831,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
822 .unwind_tables = options.unwind_tables,831 .unwind_tables = options.unwind_tables,
823 .omit_frame_pointer = options.omit_frame_pointer,832 .omit_frame_pointer = options.omit_frame_pointer,
824 .sanitize_thread = options.sanitize_thread,833 .sanitize_thread = options.sanitize_thread,
834 .error_tracing = options.error_tracing,
825 },835 },
826 .max_rss = options.max_rss,836 .max_rss = options.max_rss,
827 .filter = options.filter,837 .filter = options.filter,