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 {...@@ -174,6 +174,8 @@ pub fn buildLibCXX(comp: *Compilation) !void {
174 .want_tsan = comp.bin_file.options.tsan,174 .want_tsan = comp.bin_file.options.tsan,
175 .want_pic = comp.bin_file.options.pic,175 .want_pic = comp.bin_file.options.pic,
176 .want_pie = comp.bin_file.options.pie,176 .want_pie = comp.bin_file.options.pie,
177 .want_lto = comp.bin_file.options.lto,
178 .function_sections = comp.bin_file.options.function_sections,
177 .emit_h = null,179 .emit_h = null,
178 .strip = comp.compilerRtStrip(),180 .strip = comp.compilerRtStrip(),
179 .is_native_os = comp.bin_file.options.is_native_os,181 .is_native_os = comp.bin_file.options.is_native_os,
...@@ -292,6 +294,8 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {...@@ -292,6 +294,8 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
292 .want_tsan = comp.bin_file.options.tsan,294 .want_tsan = comp.bin_file.options.tsan,
293 .want_pic = comp.bin_file.options.pic,295 .want_pic = comp.bin_file.options.pic,
294 .want_pie = comp.bin_file.options.pie,296 .want_pie = comp.bin_file.options.pie,
297 .want_lto = comp.bin_file.options.lto,
298 .function_sections = comp.bin_file.options.function_sections,
295 .emit_h = null,299 .emit_h = null,
296 .strip = comp.compilerRtStrip(),300 .strip = comp.compilerRtStrip(),
297 .is_native_os = comp.bin_file.options.is_native_os,301 .is_native_os = comp.bin_file.options.is_native_os,
src/libunwind.zig+2
...@@ -113,6 +113,8 @@ pub fn buildStaticLib(comp: *Compilation) !void {...@@ -113,6 +113,8 @@ pub fn buildStaticLib(comp: *Compilation) !void {
113 .want_tsan = false,113 .want_tsan = false,
114 .want_pic = comp.bin_file.options.pic,114 .want_pic = comp.bin_file.options.pic,
115 .want_pie = comp.bin_file.options.pie,115 .want_pie = comp.bin_file.options.pie,
116 .want_lto = comp.bin_file.options.lto,
117 .function_sections = comp.bin_file.options.function_sections,
116 .emit_h = null,118 .emit_h = null,
117 .strip = comp.compilerRtStrip(),119 .strip = comp.compilerRtStrip(),
118 .is_native_os = comp.bin_file.options.is_native_os,120 .is_native_os = comp.bin_file.options.is_native_os,