mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
config/functions: don't enable LTO by default
Packages are only built with LTO if it's explicitly enabled via the lto build flag or if a package enables LTO via configure / cmake options. Enabling LTO via configure / cmake is the preferred way as this gives packages more fine grained control, eg enable parallel LTO linking etc. When doing this packages should respect the LTO_SUPPORT setting so LTO can be disabled globally. To avoid conflicting C/CXX/LDFLAGS no FLAGS are added when the lto build flag is not set. Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
e1f18bd4f5
commit
7608095b4e
@ -1,13 +1,8 @@
|
||||
setup_toolchain() {
|
||||
# lto flag
|
||||
if flag_enabled "lto" "$LTO_SUPPORT" "only-disable"; then
|
||||
if [ "$LTO_SUPPORT" = "yes" ] && flag_enabled "lto" "no"; then
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_LTO"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_LTO"
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_LTO"
|
||||
else
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_NOLTO"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_NOLTO"
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_NOLTO"
|
||||
fi
|
||||
|
||||
# gold flag
|
||||
|
Loading…
x
Reference in New Issue
Block a user