diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-12-26 17:26:34 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-07 12:36:43 +0100 |
commit | 0b6386e9c6a803f72182310d5832c32069f625f6 (patch) | |
tree | 749e23975644060bae4fd42e35afa27d8d2a80e7 /eclass/meson.eclass | |
parent | dev-python/aiohappyeyeballs: Keyword 2.3.1 riscv, #921513 (diff) | |
download | gentoo-0b6386e9c6a803f72182310d5832c32069f625f6.tar.gz gentoo-0b6386e9c6a803f72182310d5832c32069f625f6.tar.bz2 gentoo-0b6386e9c6a803f72182310d5832c32069f625f6.zip |
meson.eclass: Pass -Db_lto=false globally
Pass `-Db_lto=false` globally to force-disable appending `-flto`
in projects that default to it. In Gentoo, users enable LTO via setting
`*FLAGS` manually.
If a package really needs to pass `-Db_lto=true` because the build
system enables some custom logic based on it, `tc-is-lto` can be used
to determine whether LTO is enabled, and then `-Db_lto=true` can be
passed explicitly by the ebuild.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/meson.eclass')
-rw-r--r-- | eclass/meson.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass index f7cf8a0722ba..12e9dd4bd9a6 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -1,4 +1,4 @@ -# Copyright 2017-2023 Gentoo Authors +# Copyright 2017-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: meson.eclass @@ -334,6 +334,10 @@ meson_src_configure() { # It's Gentoo policy to not have builds die on blanket -Werror, as it's # an upstream development matter. bug #754279. -Dwerror=false + + # Prevent projects from enabling LTO by default. In Gentoo, LTO is + # enabled via setting *FLAGS appropriately. + -Db_lto=false ) if [[ -n ${EMESON_BUILDTYPE} ]]; then |