Skip to content

Commit

Permalink
ypkgcontext: Build with ffat-lto-objects when using LTO
Browse files Browse the repository at this point in the history
In the rare case we have to ship any static files, ensure we build
with fat LTO objects so we ship actually usable static files as
LTO bytecode is non-portable. Any LTO bytecode will be manually
stripped from archive files.
  • Loading branch information
joebonrichie committed May 27, 2024
1 parent 39eaeb4 commit 517eb60
Showing 1 changed file with 2 additions and 2 deletions.
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 517eb60

Please # to comment.