llvmPackages_rocm: 4.1.0 -> 4.3.1
This commit is contained in:
parent
e4459e59a2
commit
e3b026fdba
@ -1,4 +1,5 @@
|
|||||||
{ lib, stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, python3
|
, python3
|
||||||
@ -65,7 +66,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "ROCm fork of the clang C/C++/Objective-C/Objective-C++ LLVM compiler frontend";
|
description = "ROCm fork of the clang C/C++/Objective-C/Objective-C++ LLVM compiler frontend";
|
||||||
homepage = "https://llvm.org/";
|
homepage = "https://llvm.org/";
|
||||||
license = with licenses; [ ncsa ];
|
license = with licenses; [ ncsa ];
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -54,4 +54,12 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "ROCm fork of the LLVM Compiler runtime libraries";
|
||||||
|
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
||||||
|
license = licenses.ncsa;
|
||||||
|
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{ stdenv, lib, buildPackages, fetchFromGitHub, callPackage, wrapCCWith, overrideCC }:
|
{ stdenv, lib, buildPackages, fetchFromGitHub, callPackage, wrapCCWith, overrideCC }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.1.0";
|
version = "4.3.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "RadeonOpenCompute";
|
owner = "RadeonOpenCompute";
|
||||||
repo = "llvm-project";
|
repo = "llvm-project";
|
||||||
rev = "rocm-${version}";
|
rev = "rocm-${version}";
|
||||||
hash = "sha256-DlId/dF5r0ULl2omYPCyu1Ic3XKlLL7ndiCA0RaF264=";
|
hash = "sha256-7XVtHcrTpw+NYUvuKQFWWFE0FlOTt8EnfZpvepQqE1c=";
|
||||||
};
|
};
|
||||||
in rec {
|
in rec {
|
||||||
clang = wrapCCWith rec {
|
clang = wrapCCWith rec {
|
||||||
@ -15,8 +15,10 @@ in rec {
|
|||||||
clang_version=`${cc}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"`
|
clang_version=`${cc}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"`
|
||||||
rsrc="$out/resource-root"
|
rsrc="$out/resource-root"
|
||||||
mkdir "$rsrc"
|
mkdir "$rsrc"
|
||||||
ln -s "${lib.getLib cc}/lib/clang/$clang_version/include" "$rsrc"
|
ln -s "${cc}/lib/clang/$clang_version/include" "$rsrc"
|
||||||
|
ln -s "${compiler-rt}/lib" "$rsrc/lib"
|
||||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||||
|
echo "--gcc-toolchain=${stdenv.cc.cc}" >> $out/nix-support/cc-cflags
|
||||||
echo "-Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
|
echo "-Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
|
||||||
rm $out/nix-support/add-hardening.sh
|
rm $out/nix-support/add-hardening.sh
|
||||||
touch $out/nix-support/add-hardening.sh
|
touch $out/nix-support/add-hardening.sh
|
||||||
@ -52,7 +54,6 @@ in rec {
|
|||||||
lld = callPackage ./lld.nix {
|
lld = callPackage ./lld.nix {
|
||||||
inherit llvm version;
|
inherit llvm version;
|
||||||
src = "${src}/lld";
|
src = "${src}/lld";
|
||||||
buildLlvmTools = buildPackages.llvmPackages_rocm;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
llvm = callPackage ./llvm {
|
llvm = callPackage ./llvm {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv
|
{ stdenv
|
||||||
, buildLlvmTools
|
, lib
|
||||||
, cmake
|
, cmake
|
||||||
, libxml2
|
, libxml2
|
||||||
, llvm
|
, llvm
|
||||||
@ -14,18 +14,13 @@ stdenv.mkDerivation rec {
|
|||||||
pname = "lld";
|
pname = "lld";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
buildInputs = [ libxml2 llvm ];
|
buildInputs = [ libxml2 llvm ];
|
||||||
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DLLVM_MAIN_SRC_DIR=${llvm.src}"
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DLLVM_CONFIG_PATH=${llvm.dev}/bin/llvm-config-native"
|
|
||||||
];
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
moveToOutput include "$dev"
|
moveToOutput include "$dev"
|
||||||
moveToOutput lib "$dev"
|
moveToOutput lib "$dev"
|
||||||
@ -39,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "ROCm fork of the LLVM Linker";
|
description = "ROCm fork of the LLVM Linker";
|
||||||
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
||||||
license = licenses.ncsa;
|
license = licenses.ncsa;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ lib, stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, python3
|
, python3
|
||||||
@ -91,7 +92,7 @@ in stdenv.mkDerivation rec {
|
|||||||
description = "ROCm fork of the LLVM compiler infrastructure";
|
description = "ROCm fork of the LLVM compiler infrastructure";
|
||||||
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
||||||
license = with licenses; [ ncsa ];
|
license = with licenses; [ ncsa ];
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user