Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

thoughtpolice
Copy link
Collaborator

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:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@thoughtpolice
Copy link
Collaborator Author

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.

Actually this... doesn't really matter because it's purely for the devShell. So maybe this fix can go ahead and be merged, but I'll think about it some more.

@thoughtpolice thoughtpolice force-pushed the aseipp/push-ovozoptrkkyz branch 2 times, most recently from f5885ae to 8491644 Compare June 20, 2024 00:08
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant