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 {...@@ -1469,6 +1469,7 @@ pub const LibExeObjStep = struct {
1469 major_only_filename: ?[]const u8,1469 major_only_filename: ?[]const u8,
1470 name_only_filename: ?[]const u8,1470 name_only_filename: ?[]const u8,
1471 strip: ?bool,1471 strip: ?bool,
1472 unwind_tables: ?bool,
1472 // keep in sync with src/link.zig:CompressDebugSections1473 // keep in sync with src/link.zig:CompressDebugSections
1473 compress_debug_sections: enum { none, zlib } = .none,1474 compress_debug_sections: enum { none, zlib } = .none,
1474 lib_paths: ArrayList([]const u8),1475 lib_paths: ArrayList([]const u8),
...@@ -1739,6 +1740,7 @@ pub const LibExeObjStep = struct {...@@ -1739,6 +1740,7 @@ pub const LibExeObjStep = struct {
1739 const self = builder.allocator.create(LibExeObjStep) catch unreachable;1740 const self = builder.allocator.create(LibExeObjStep) catch unreachable;
1740 self.* = LibExeObjStep{1741 self.* = LibExeObjStep{
1741 .strip = null,1742 .strip = null,
1743 .unwind_tables = null,
1742 .builder = builder,1744 .builder = builder,
1743 .verbose_link = false,1745 .verbose_link = false,
1744 .verbose_cc = false,1746 .verbose_cc = false,
...@@ -2698,6 +2700,14 @@ pub const LibExeObjStep = struct {...@@ -2698,6 +2700,14 @@ pub const LibExeObjStep = struct {
2698 }2700 }
2699 }2701 }
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
2701 switch (self.compress_debug_sections) {2711 switch (self.compress_debug_sections) {
2702 .none => {},2712 .none => {},
2703 .zlib => try zig_args.append("--compress-debug-sections=zlib"),2713 .zlib => try zig_args.append("--compress-debug-sections=zlib"),