deno: disable LTO on Linux and x86_64-darwin

This commit is contained in:
Olivér Falvai
2025-06-19 07:41:52 +02:00
parent d88d2735a6
commit abc9b18038
+14 -4
View File
@@ -56,10 +56,20 @@ rustPlatform.buildRustPackage (finalAttrs: {
./tests-darwin-differences.patch
./tests-no-chown.patch
];
postPatch = ''
# Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857
tomlq -ti '.workspace.dependencies.libffi = { "version": .workspace.dependencies.libffi, "features": ["system"] }' Cargo.toml
'';
postPatch =
''
# Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857
tomlq -ti '.workspace.dependencies.libffi = { "version": .workspace.dependencies.libffi, "features": ["system"] }' Cargo.toml
''
+
lib.optionalString
(stdenv.hostPlatform.isLinux || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64))
''
# LTO crashes with the latest Rust + LLVM combination.
# https://github.com/rust-lang/rust/issues/141737
# TODO: remove this once LLVM is upgraded to 20.1.7
tomlq -ti '.profile.release.lto = false' Cargo.toml
'';
buildInputs = [
libffi