ghcWithPackages: fix / update LLVM deactivation if NCG is available#146493
Merged
sternenseemann merged 2 commits intoNixOS:haskell-updatesfrom Nov 20, 2021
Merged
Conversation
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.
Member
|
Wow. It took me far too long to understand what this does.^^ |
maralorn
approved these changes
Nov 18, 2021
Member
Author
|
May be smart to backport if we don't make the branch-off. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)