authorgravatar for lord@mzte.deLordMZTE <lord@mzte.de> 2022-10-19 13:13:37+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-19 13:24:06-04:00
log3f577f06a07f802167b1b3f8194f6199140637c8
treec9f66fd9048c96a5d39e2d15ae6295de6e609712
parent8a344fab3908e1b793fe8f9590696142aee2a1be

build: added unwind_tables to LibExeObjStep


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

lib/std/build.zig+10
......@@ -1469,6 +1469,7 @@ pub const LibExeObjStep = struct {
14691469 major_only_filename: ?[]const u8,
14701470 name_only_filename: ?[]const u8,
14711471 strip: ?bool,
1472 unwind_tables: ?bool,
14721473 // keep in sync with src/link.zig:CompressDebugSections
14731474 compress_debug_sections: enum { none, zlib } = .none,
14741475 lib_paths: ArrayList([]const u8),
......@@ -1739,6 +1740,7 @@ pub const LibExeObjStep = struct {
17391740 const self = builder.allocator.create(LibExeObjStep) catch unreachable;
17401741 self.* = LibExeObjStep{
17411742 .strip = null,
1743 .unwind_tables = null,
17421744 .builder = builder,
17431745 .verbose_link = false,
17441746 .verbose_cc = false,
......@@ -2698,6 +2700,14 @@ pub const LibExeObjStep = struct {
26982700 }
26992701 }
27002702
2703 if (self.unwind_tables) |unwind_tables| {
2704 if (unwind_tables) {
2705 try zig_args.append("-funwind-tables");
2706 } else {
2707 try zig_args.append("-fno-unwind-tables");
2708 }
2709 }
2710
27012711 switch (self.compress_debug_sections) {
27022712 .none => {},
27032713 .zlib => try zig_args.append("--compress-debug-sections=zlib"),