deno: disable LTO on Linux and x86_64-darwin
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user