authorgravatar for xavierb@gmail.comxavier <xavierb@gmail.com> 2021-05-23 16:51:22+02:00
committergravatar for xavierb@gmail.comxavier <xavierb@gmail.com> 2021-05-23 19:58:26+02:00
log40d8518253c2566fe9ba947c2e1fbce160a55940
tree087afc79a92efa93e703fafe7919c252cc23f500
parentd321a4b765b94818c4a483a784bb6fc9048c64ba

apply -flto and -ffunction-sections when compiling libc++


2 files changed, 6 insertions(+), 0 deletions(-)

src/libcxx.zig+4
......@@ -174,6 +174,8 @@ pub fn buildLibCXX(comp: *Compilation) !void {
174174 .want_tsan = comp.bin_file.options.tsan,
175175 .want_pic = comp.bin_file.options.pic,
176176 .want_pie = comp.bin_file.options.pie,
177 .want_lto = comp.bin_file.options.lto,
178 .function_sections = comp.bin_file.options.function_sections,
177179 .emit_h = null,
178180 .strip = comp.compilerRtStrip(),
179181 .is_native_os = comp.bin_file.options.is_native_os,
......@@ -292,6 +294,8 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
292294 .want_tsan = comp.bin_file.options.tsan,
293295 .want_pic = comp.bin_file.options.pic,
294296 .want_pie = comp.bin_file.options.pie,
297 .want_lto = comp.bin_file.options.lto,
298 .function_sections = comp.bin_file.options.function_sections,
295299 .emit_h = null,
296300 .strip = comp.compilerRtStrip(),
297301 .is_native_os = comp.bin_file.options.is_native_os,
src/libunwind.zig+2
......@@ -113,6 +113,8 @@ pub fn buildStaticLib(comp: *Compilation) !void {
113113 .want_tsan = false,
114114 .want_pic = comp.bin_file.options.pic,
115115 .want_pie = comp.bin_file.options.pie,
116 .want_lto = comp.bin_file.options.lto,
117 .function_sections = comp.bin_file.options.function_sections,
116118 .emit_h = null,
117119 .strip = comp.compilerRtStrip(),
118120 .is_native_os = comp.bin_file.options.is_native_os,