Skip to content

Disable fat LTO objects by default, detect LTO built .a/.o files - #159

Draft
joebonrichie wants to merge 1 commit into
mainfrom
slim-lto-by-default
Draft

Disable fat LTO objects by default, detect LTO built .a/.o files#159
joebonrichie wants to merge 1 commit into
mainfrom
slim-lto-by-default

Conversation

@joebonrichie

Copy link
Copy Markdown
Contributor

Summary

When building with LTO, disable fat-lto-objects by default in favour of slim LTO objects.

Building with fat LTO objects by default significantly increases build time to catch the rare cases when we do actually ship static files in a package when building with LTO.

Instead, detect any static files or object files containing only LTO bytecode and warn the packager the offending file(s) must be removed or rebuilt with fat-lto-objects.

This way we can significantly reduce build times and disk usage when LTO is enabled.

Test Plan

Build packages with GCC LTO, clang thin LTO, clang fat LTO, ensure static files built without fat-lto-objects were caught.

When building with LTO, disable fat-lto-objects by default in favour of
slim LTO objects.

Building with fat LTO objects by default significantly increases build
time to catch the rare cases when we do actually ship static files in a
package when building with LTO.

Instead, detect any static files or object files containing only LTO
bytecode and warn the packager the offending file(s) must be removed or
rebuilt with fat-lto-objects.

This way we can significantly reduce build times and disk usage when
LTO is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant