commit a471407e1b2b7fc54df9dacbe9f41d992b6037b4
parent e2e91539047e030b956e01fd5e8c28c074ae3f88
Author: serge-sans-paille <sguelton@mozilla.com>
Date: Thu, 16 Oct 2025 03:33:15 +0000
Bug 1994413 - Fix fat-lto-objects linker support check r=glandium
- Revert the lto & test condition
- By-pass the check if the linker is known to not support that feature
Differential Revision: https://phabricator.services.mozilla.com/D268745
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure
@@ -265,7 +265,9 @@ use_fat_lto = cxx_compiler.try_link(
lambda extra: ["-flto", "-ffat-lto-objects"] + (extra or [])
),
check_msg="whether the C++ compiler supports fat lto objects",
- when=depends("--enable-lto", enable_tests)(lambda lto, tests: lto and not tests),
+ when=depends(select_linker, "--enable-lto", enable_tests)(
+ lambda linker, lto, tests: linker and linker.KIND == "lld" and lto and tests
+ ),
)