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

ghcWithPackages: fix / update LLVM deactivation if NCG is available #146493

Conversation

sternenseemann
Copy link
Member

Motivation for this change
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.

The availability of native codegen (which allows us to disable the LLVM
backend by default) hinges on the target platform of the compiler (that
is GHC), not on the platform it runs on (the host platform).
Based on https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms, although
it sadly doesn't list when the backends were introduced.

* PowerPC, x86 (and x86_64) and Sparc have been supported for longer.

* aarch64-darwin is new in 9.2.1 and backported to 8.10.5, 8.10.6 and
  8.10.7 (check is dumb here since we'll grep for 8.10.7 anyways when
  upgrading)

Fixes ghcWithPackages failing to evaluate on aarch64-darwin because of
missing support for the platform in LLVM 9's compiler-rt.
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 18, 2021
@maralorn
Copy link
Member

Wow. It took me far too long to understand what this does.^^ lib.any lib.id should be forbidden by the Geneva convention. But whatever …

@sternenseemann sternenseemann merged commit ca929af into NixOS:haskell-updates Nov 20, 2021
@sternenseemann sternenseemann deleted the ghc-with-packages-native-codegen branch November 20, 2021 15:34
@sternenseemann
Copy link
Member Author

May be smart to backport if we don't make the branch-off.

@sternenseemann sternenseemann added 9.needs: port to stable A PR needs a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: haskell 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants