Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build with fat LTO objects by default and strip LTO bytecode from static archives #74

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ypkg2/examine.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def strip_file(context, pretty, file, magic_string, mode=None):
elif mode == "ko":
flags = "-g --strip-unneeded"
elif mode == "ar":
flags = "--strip-debug"
flags = "--strip-debug -p -R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1"
if context.spec.pkg_clang:
cmd = "{} llvm-objcopy {} \"{}\""
try:
Expand Down
4 changes: 2 additions & 2 deletions ypkg2/ypkgcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
SIZE_FLAGS_CLANG = "-O2"

# Allow optimizing for LTO
LTO_FLAGS = "-flto=auto"
LTO_FLAGS = "-flto=auto -ffat-lto-objects"

# Allow optimizing for thin-lto
THIN_LTO_FLAGS = "-flto=thin"
THIN_LTO_FLAGS = "-flto=thin -ffat-lto-objects"

# Allow optimizing for ICF all (identical code folding)
ICF_ALL_FLAGS = "-Wl,--icf=all"
Expand Down