deno: fix clang build failure
https://hydra.nixos.org/build/282160517/log/tail
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
librusty_v8 ? callPackage ./librusty_v8.nix {
|
||||
inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8;
|
||||
},
|
||||
libffi,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -33,7 +34,10 @@ rustPlatform.buildRustPackage rec {
|
||||
postPatch = ''
|
||||
# upstream uses lld on aarch64-darwin for faster builds
|
||||
# within nix lld looks for CoreFoundation rather than CoreFoundation.tbd and fails
|
||||
substituteInPlace .cargo/config.toml --replace "-fuse-ld=lld " ""
|
||||
substituteInPlace .cargo/config.toml --replace-fail "-fuse-ld=lld " ""
|
||||
|
||||
# Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857
|
||||
substituteInPlace ext/ffi/Cargo.toml --replace-fail "libffi = \"=3.2.0\"" "libffi = { version = \"3.2.0\", features = [\"system\"] }"
|
||||
'';
|
||||
|
||||
# uses zlib-ng but can't dynamically link yet
|
||||
@@ -46,7 +50,12 @@ rustPlatform.buildRustPackage rec {
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
configureFlags = lib.optionals stdenv.cc.isClang [
|
||||
# This never worked with clang, but became a hard error recently: https://github.com/llvm/llvm-project/commit/3d5b610c864c8f5980eaa16c22b71ff1cf462fae
|
||||
"--disable-multi-os-directory"
|
||||
];
|
||||
|
||||
buildInputs = [ libffi ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
apple-sdk_11
|
||||
# V8 supports 10.15+; binary references `aligned_alloc` directly
|
||||
(darwinMinVersionHook "10.15")
|
||||
|
||||
Reference in New Issue
Block a user