mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
nix: Go around a linker issue on Darwin (#58070)
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Release Notes: - N/A
This commit is contained in:
parent
f49be143f3
commit
81f818aa86
1 changed files with 8 additions and 0 deletions
|
|
@ -38,6 +38,7 @@
|
|||
libxfixes,
|
||||
libxkbcommon,
|
||||
libxrandr,
|
||||
lld,
|
||||
libx11,
|
||||
libxcb,
|
||||
nodejs_22,
|
||||
|
|
@ -137,6 +138,8 @@ let
|
|||
]
|
||||
++ lib.optionals stdenv'.hostPlatform.isLinux [ makeWrapper ]
|
||||
++ lib.optionals stdenv'.hostPlatform.isDarwin [
|
||||
# Provides `ld64.lld` for clang's `-fuse-ld=lld`.
|
||||
lld
|
||||
(cargo-bundle.overrideAttrs (
|
||||
new: old: {
|
||||
version = "0.6.1-zed";
|
||||
|
|
@ -246,6 +249,11 @@ let
|
|||
}";
|
||||
|
||||
NIX_OUTPATH_USED_AS_RANDOM_SEED = "norebuilds";
|
||||
}
|
||||
// lib.optionalAttrs stdenv'.hostPlatform.isDarwin {
|
||||
# Link with lld on Darwin. nixpkgs' classic open-source ld64 fails to insert
|
||||
# ARM64 branch thunks for this binary, producing `b(l) ARM64 branch out of range`.
|
||||
NIX_CFLAGS_LINK = "-fuse-ld=lld";
|
||||
};
|
||||
|
||||
# prevent nix from removing the "unused" wayland/gpu-lib rpaths
|
||||
|
|
|
|||
Loading…
Reference in a new issue