authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-23 02:25:18+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-09-19 18:20:21-07:00
log70a1805e46b66955b52ba5ac46914f212d99d19c
treebe038c91e3c4e0ab07eb6d244d8bc791457f82f7
parent26ddfabba4611231fa486322b9ba11b1057a2053

libunwind: Synchronize some CFLAGS/CXXFLAGS with upstream.


1 files changed, 7 insertions(+), 2 deletions(-)

src/libunwind.zig+7-2
......@@ -100,14 +100,18 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
100100
101101 switch (Compilation.classifyFileExt(unwind_src)) {
102102 .c => {
103 try cflags.append("-std=c11");
103 try cflags.append("-std=c17");
104104 },
105105 .cpp => {
106 try cflags.appendSlice(&[_][]const u8{"-fno-rtti"});
106 try cflags.appendSlice(&[_][]const u8{
107 "-std=c++17",
108 "-fno-rtti",
109 });
107110 },
108111 .assembly_with_cpp => {},
109112 else => unreachable, // You can see the entire list of files just above.
110113 }
114 try cflags.append("-fno-exceptions");
111115 try cflags.append("-I");
112116 try cflags.append(try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libunwind", "include" }));
113117 if (target_util.supports_fpic(target)) {
......@@ -117,6 +121,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
117121 try cflags.append("-Wa,--noexecstack");
118122 try cflags.append("-fvisibility=hidden");
119123 try cflags.append("-fvisibility-inlines-hidden");
124 try cflags.append("-fvisibility-global-new-delete=force-hidden");
120125 // necessary so that libunwind can unwind through its own stack frames
121126 try cflags.append("-funwind-tables");
122127