-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix: use -ld_new
on macOS
#3880
Conversation
Actually this... doesn't really matter because it's purely for the |
8491644
to
f169a8d
Compare
This would make me happy. Does it speed up the build for tests meaningfully too? |
Probably, but I haven't looked at that exactly. That said this is a small and easy change to make so if someone else likes it, I think it can be merged and backed out if it turns out bad. |
I think you can just use |
Oh, I guess you can’t use |
56a1e3d
to
70abe92
Compare
Sure does work, please take a look. /cc'ing @necauqua for review too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work for me! Just a couple nits…
By the way, do we know if this breaks pre‐Sonoma or not? I wonder if maybe the older |
It probably does, but it only applies to |
Breaking support for everything but the latest macOS release makes me a little nervous, but I guess there’s probably, like, five of us actually using the flake to do Jujutsu development, so… sure, why not wait and see :) |
26ab151
to
0218d93
Compare
I've never heard of running nix on Windows, but wouldn't it be better to just have an empty list there in place of a throw? Just so that in the rare case both checks are false, it wouldn't outright fail because we told it to Other than that, I don't have a Mac, so I can't test, but it looks ok |
You kind of can’t run Nix on Windows at present. The most viable third OS is, I think, FreeBSD? I know people are actively working on support for that but I don’t think there’s much upstream at present and I’d be surprised if they have enough working for the Jujutsu flake to work. Agreed that an empty list is preferable though. |
The new parallel macOS linker reduces link time for the debug `jj` binary from 3s to 0.7s on my M2 Macbook Air, which is a significant reduction for nearly no cost at all. This only assumes that you have a new enough Xcode environment as your default (where `/usr/bin/ld` resides.) This change requires Sonoma and Xcode 15, but in theory I think we could target a lower macOS SDK version in order to produce binaries that are more backwards compatible, so the only real cost is that developers who also use Nix would require Sonoma.
The relevant upstream issue has been fixed since version 0.9.72, as noticed by Emily. Signed-off-by: Austin Seipp <[email protected]>
0218d93
to
14ed4dc
Compare
I reworked it to use an empty list. Thanks! |
The new parallel macOS linker reduces link time for the debug
jj
binary from 3s to 0.7s on my M2 Macbook Air, which is a significant reduction for nearly no cost at all.However, enabling it is rather strange because we have to give a full path to the /Applications directory, and I don't know of a good way to encapsulate it with existing Nix primitives inside Nixpkgs...
This change requires Sonoma and Xcode 15, but in theory I think we could target a lower macOS SDK version in order to produce binaries that are more backwards compatible, so the only real cost is that developers who also use Nix would require Sonoma.
Checklist
If applicable:
CHANGELOG.md