diff options
| -rw-r--r-- | meta/conf/distro/include/lto.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/conf/distro/include/lto.inc b/meta/conf/distro/include/lto.inc index fe0f6c9f44..d7fea26c64 100644 --- a/meta/conf/distro/include/lto.inc +++ b/meta/conf/distro/include/lto.inc | |||
| @@ -20,7 +20,16 @@ LTO_pn-libbsd = "" | |||
| 20 | 20 | ||
| 21 | # Override it for additional or different options if needed e.g. | 21 | # Override it for additional or different options if needed e.g. |
| 22 | # with clang thin-lto might be better for compile speed | 22 | # with clang thin-lto might be better for compile speed |
| 23 | LTO ?= "-flto" | 23 | # |
| 24 | # ffat-lto-objects | ||
| 25 | # object files that contain both the intermediate | ||
| 26 | # language and the object code. This makes them | ||
| 27 | # usable for both LTO linking and normal linking | ||
| 28 | # | ||
| 29 | # -fuse-linker-plugin | ||
| 30 | # ensures that libraries participate in LTO by supplying intermediate | ||
| 31 | # code from .a files to linker | ||
| 32 | LTO ?= "-flto -ffat-lto-objects -fuse-linker-plugin " | ||
| 24 | 33 | ||
| 25 | SELECTED_OPTIMIZATION_append = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}" | 34 | SELECTED_OPTIMIZATION_append = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}" |
| 26 | TARGET_LDFLAGS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}" | 35 | TARGET_LDFLAGS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}" |
