Skip to content

Commit

Permalink
Merge pull request #74 from getsolus/strip-lto-bytecode
Browse files Browse the repository at this point in the history
Build with fat LTO objects by default and strip LTO bytecode from static archives
  • Loading branch information
joebonrichie committed May 27, 2024
2 parents 3ed0c48 + 517eb60 commit e231448
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ypkg2/examine.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,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

0 comments on commit e231448

Please # to comment.