mirror of
https://github.com/Feliix42/mlir.nix.git
synced 2024-11-27 12:56:31 +00:00
Compare commits
No commits in common. "cb759f2c817155b3a68a81fa8d7ef7526ea08058" and "74c441cc29c688b02eec6343f44b6e68e45d2d72" have entirely different histories.
cb759f2c81
...
74c441cc29
2 changed files with 22 additions and 22 deletions
|
@ -2,16 +2,16 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690370995,
|
||||
"narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=",
|
||||
"lastModified": 1681269223,
|
||||
"narHash": "sha256-i6OeI2f7qGvmLfD07l1Az5iBL+bFeP0RHixisWtpUGo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341",
|
||||
"rev": "87edbd74246ccdfa64503f334ed86fa04010bab9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-23.05",
|
||||
"ref": "nixos-22.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -2,15 +2,15 @@
|
|||
description = "Custom-Built MLIR Tools";
|
||||
|
||||
# Nixpkgs / NixOS version to use.
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
|
||||
# git revision to use (for version and git pull
|
||||
#llvmRevision = "llvmorg-17-init";
|
||||
llvmRevision = "0a35ac6c2e0cb0160ca2e6cc11644c263692a46d";
|
||||
circtRevision = "720846dd1611a336424e0d8a4ae81fd53b220ced";
|
||||
llvmRevision = "010a97974a158ebca0bdb58346a2b303ab8a401e";
|
||||
circtRevision = "4937a94071b4a3e15c740ae445e14b47e1f8154e";
|
||||
|
||||
# to work with older version of flakes
|
||||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
||||
|
@ -26,23 +26,23 @@
|
|||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
# Nixpkgs instantiated for supported system types.
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlays.default ]; });
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
# A Nixpkgs overlay.
|
||||
overlays.default = final: prev: {
|
||||
overlay = final: prev: {
|
||||
|
||||
mlir = with final; llvmPackages_16.stdenv.mkDerivation rec {
|
||||
mlir = with final; llvmPackages_14.stdenv.mkDerivation rec {
|
||||
name = "mlir-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
rev = llvmRevision;
|
||||
sha256 = "sha256-e8Rr1NZznjnNo3GvD1VSx8yb2ZcUdM2LtZDyNnwIJdU="; # lib.fakeSha256;
|
||||
sha256 = "sha256-iZBZcHYW/rJm+4KAcNZGwryKsYsEQNi1LTpS0Mnm08A=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/llvm";
|
||||
|
@ -53,9 +53,9 @@
|
|||
cmake
|
||||
ncurses
|
||||
zlib
|
||||
llvmPackages_16.llvm
|
||||
llvmPackages_16.clang
|
||||
llvmPackages_16.bintools
|
||||
llvmPackages_14.llvm
|
||||
llvmPackages_14.clang
|
||||
llvmPackages_14.bintools
|
||||
];
|
||||
|
||||
buildInputs = [ libxml2 ];
|
||||
|
@ -85,7 +85,7 @@
|
|||
"-DCMAKE_C_COMPILER=clang"
|
||||
"-DCMAKE_CXX_COMPILER=clang++"
|
||||
"-DLLVM_ENABLE_LLD=ON"
|
||||
#"-DLLVM_USE_LINKER=${llvmPackages_16.bintools}/bin/lld"
|
||||
#"-DLLVM_USE_LINKER=${llvmPackages_14.bintools}/bin/lld"
|
||||
# CCache can drastically speed up further rebuilds, try adding:
|
||||
#"-DLLVM_CCACHE_BUILD=ON"
|
||||
# libxml2 needs to be disabled because the LLVM build system ignores its .la
|
||||
|
@ -100,14 +100,14 @@
|
|||
# '';
|
||||
};
|
||||
|
||||
circt = with final; llvmPackages_16.stdenv.mkDerivation rec {
|
||||
circt = with final; llvmPackages_14.stdenv.mkDerivation rec {
|
||||
name = "circt-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "circt";
|
||||
rev = circtRevision;
|
||||
sha256 = "sha256-iPt50T5+yqTnZKzgR5C6UW97XXfiKR1vXzXTNnvZOjE="; # lib.fakeSha256;
|
||||
sha256 = "sha256-jptvNvrTF52vh0NyLqo4Iv6Ov9qttluERZgXsnayKa8=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/";
|
||||
|
@ -118,9 +118,9 @@
|
|||
cmake
|
||||
#ncurses
|
||||
#zlib
|
||||
#llvmPackages_16.llvm
|
||||
llvmPackages_16.clang
|
||||
llvmPackages_16.bintools
|
||||
#llvmPackages_14.llvm
|
||||
llvmPackages_14.clang
|
||||
llvmPackages_14.bintools
|
||||
mlir
|
||||
lit
|
||||
];
|
||||
|
@ -178,7 +178,7 @@
|
|||
nixosModules.mlir =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
nixpkgs.overlays = [ self.overlay ];
|
||||
|
||||
environment.systemPackages = [ pkgs.mlir ];
|
||||
|
||||
|
@ -188,7 +188,7 @@
|
|||
nixosModules.circt =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
nixpkgs.overlays = [ self.overlay ];
|
||||
|
||||
environment.systemPackages = [ pkgs.circt ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue