Skip to content

elan: wrap embedded linker#146162

Merged
gebner merged 1 commit intoNixOS:masterfrom
Kha:elan-wrap-lld
Nov 15, 2021
Merged

elan: wrap embedded linker#146162
gebner merged 1 commit intoNixOS:masterfrom
Kha:elan-wrap-lld

Conversation

@Kha
Copy link
Contributor

@Kha Kha commented Nov 15, 2021

Motivation for this change

Lean 4 will soon start shipping its own toolchain including lld: leanprover/lean4#795. This change is in preparation of that by wrapping the embedded ld.lld (Linux)/ld64.lld (macOS) in order to pass the correct interpreter. While we're at it, we drop the old GMP wrapper that has not been necessary for a long time, if at all.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested a review from gebner November 15, 2021 16:28
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Nov 15, 2021
@gebner
Copy link
Member

gebner commented Nov 15, 2021

Works for me. If anybody wants to test this (it would be great if someone could test this on darwin), this is what you should try:

echo 'int main() { return 42; }' >main.c
nix shell .#elan -c leanc +Kha/lean4:4.0.0-bundle-rc main.c
./a.out

@gebner gebner merged commit f4e3542 into NixOS:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants