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

Conversation

joebonrichie
Copy link
Contributor

LTO Bytecode is non portable. Let's build everything with fat lto objects then strip the bytecode after the fact.

Note: only clang 18 supports fat lto objects

LTO Bytecode is non portable. Let's build everything with fat lto objects
then strip the bytecode after the fact.

Note: only clang 18 supports fat lto objects
@joebonrichie
Copy link
Contributor Author

Confirmed working with gnu toolchain, building a static file with LTO and fat lto objects strip will now remove the lto bytecode sections from the archive.

We'll have to wait until llvm/clang 18 lands in the repo for it's fat lto objects support.

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.
@joebonrichie joebonrichie marked this pull request as ready for review May 27, 2024 16:07
@joebonrichie
Copy link
Contributor Author

Good to go now LLVM/clang 18 is in unstable.

@joebonrichie joebonrichie changed the title examine.py: Strip lto bytecode from static archives Build with fat LTO objects by default and strip LTO bytecode from static archives May 27, 2024
Copy link
Contributor

@ermo ermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber-stamped as requested.

@joebonrichie joebonrichie merged commit e231448 into master May 27, 2024
@joebonrichie joebonrichie deleted the strip-lto-bytecode branch May 27, 2024 17:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants