summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-11-08 16:02:07 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-11 10:08:11 +0000
commit9df7ab80895547a43857a299b58014dc359b6283 (patch)
tree5464e25b244bb9febda0720d61c1e8ed76582ad1 /meta/conf
parentf075071761172c69f8ae2be5868d51ef9ef646e7 (diff)
downloadpoky-9df7ab80895547a43857a299b58014dc359b6283.tar.gz
lto: Add global LTO distro policy file
Distros which want to enable LTO can utilize this file, it only covers packages from OE-Core, other layers should include there own exclusion list for recipe which dont work with LTO Document the needed changes in local.conf.extended (From OE-Core rev: 228b5a91516cdf9d5a1df3c721ba8e5619b188ab) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/distro/include/lto.inc28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/conf/distro/include/lto.inc b/meta/conf/distro/include/lto.inc
new file mode 100644
index 0000000000..fe0f6c9f44
--- /dev/null
+++ b/meta/conf/distro/include/lto.inc
@@ -0,0 +1,28 @@
1# To enable LTO, add following in local.conf
2# require conf/distro/include/lto.inc
3# DISTRO_FEATURES_append = " lto"
4#
5
6# Disable LTO for following packages
7LTO_pn-glibc = ""
8LTO_pn-gcc-runtime = ""
9LTO_pn-libgcc-initial = ""
10LTO_pn-libgcc = ""
11LTO_pn-libpam = ""
12LTO_pn-elfutils = ""
13LTO_pn-perl = ""
14LTO_pn-busybox = ""
15LTO_pn-libxcrypt = ""
16LTO_pn-curl = ""
17LTO_pn-libcap = ""
18LTO_pn-libproxy = ""
19LTO_pn-libbsd = ""
20
21# Override it for additional or different options if needed e.g.
22# with clang thin-lto might be better for compile speed
23LTO ?= "-flto"
24
25SELECTED_OPTIMIZATION_append = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}"
26TARGET_LDFLAGS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}"
27
28SELECTED_OPTIMIZATION[vardeps] += "LTO"