1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

x86_64-darwin: Disable LTO

LTO on x86_64-darwin appears to break the ability to catch exceptions
correctly (maybe just for exception types defined in different
libraries). This leads to many weird test failures,
e.g. https://hydra.nixos.org/build/286312387 and
https://hydra.nixos.org/build/286312341.
This commit is contained in:
Eelco Dolstra 2025-01-21 18:10:12 +01:00
parent b8c296f0de
commit b09b4dc995

View file

@ -79,6 +79,8 @@ let
!stdenv.hostPlatform.isWindows
# build failure
&& !stdenv.hostPlatform.isStatic
# LTO breaks exception handling on x86-64-darwin.
&& stdenv.system != "x86_64-darwin"
) ''
case "$mesonBuildType" in
release|minsize) appendToVar mesonFlags "-Db_lto=true" ;;