Skip to content

Commit

Permalink
Add llvm compiler-nix-names (#2106)
Browse files Browse the repository at this point in the history
* Add llvm compiler-nix-names

* ifdLevel 1

* Disable llvm for windows and ghcjs

GHCJS makes no sense to be built with LLVM,
and Windows doesn't work with LLVM apparently generating invalid assembly.

* ifdLevel 2

* Add materialized iserv-proxy files for llvm compilers

* Disable more llvm builds for windows, a bit more explicitly.

* ifdLevel 3

* Add materialized files

* More materialized files

* ifdLevel 1

* ifdLevel 2

* ifdLevel 3

* Add `-llvm` to ghc derivation name

* Add `-llvm` to ghc derivation name

* ifdLevel 2

* ifdLevel 3

* Disable dwarf test for llvm compilers

---------

Co-authored-by: Moritz Angermann <[email protected]>
  • Loading branch information
hamishmack and angerman authored Nov 27, 2023
1 parent b4b021a commit 7c491c5
Show file tree
Hide file tree
Showing 136 changed files with 9,368 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
ghc92 = true;
ghc94 = true;
ghc96 = true;
ghc96llvm = true;
ghc98 = true;
ghc98llvm = true;
ghc98X = true;
ghc99 = true;
})));
Expand All @@ -77,17 +79,20 @@
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
|| (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
|| (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
|| (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
)) {
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884"])
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc8107" "ghc902" "ghc928"])
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) ucrt64;
Expand Down
2 changes: 1 addition & 1 deletion compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ let
in
stdenv.mkDerivation (rec {
version = ghc-version;
name = "${targetPrefix}ghc-${version}";
name = "${targetPrefix}ghc-${version}" + lib.optionalString (useLLVM) "-llvm";

inherit src configureFlags;
patches = ghc-patches;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc963llvm-aarch64/Cabal.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc963llvm-aarch64/base.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c491c5

Please sign in to comment.