mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
maint: Disable LTO for static due to build failure
This commit is contained in:
parent
0c85477f8e
commit
809f157a49
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ let
|
||||||
# Users who are debugging Nix builds are expected to set the environment variable `mesonBuildType`, per the
|
# Users who are debugging Nix builds are expected to set the environment variable `mesonBuildType`, per the
|
||||||
# guidance in https://github.com/NixOS/nix/blob/8a3fc27f1b63a08ac983ee46435a56cf49ebaf4a/doc/manual/source/development/debugging.md?plain=1#L10.
|
# guidance in https://github.com/NixOS/nix/blob/8a3fc27f1b63a08ac983ee46435a56cf49ebaf4a/doc/manual/source/development/debugging.md?plain=1#L10.
|
||||||
# For this reason, we don't want to refer to `finalAttrs.mesonBuildType` here, but rather use the environment variable.
|
# For this reason, we don't want to refer to `finalAttrs.mesonBuildType` here, but rather use the environment variable.
|
||||||
preConfigure = prevAttrs.preConfigure or "" + lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
preConfigure = prevAttrs.preConfigure or "" + lib.optionalString (
|
||||||
|
!stdenv.hostPlatform.isWindows
|
||||||
|
# build failure
|
||||||
|
&& !stdenv.hostPlatform.isStatic
|
||||||
|
) ''
|
||||||
case "$mesonBuildType" in
|
case "$mesonBuildType" in
|
||||||
release|minsize) appendToVar mesonFlags "-Db_lto=true" ;;
|
release|minsize) appendToVar mesonFlags "-Db_lto=true" ;;
|
||||||
*) appendToVar mesonFlags "-Db_lto=false" ;;
|
*) appendToVar mesonFlags "-Db_lto=false" ;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue