1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00

llvmPackages_rocm: 4.1.0 -> 4.3.1

This commit is contained in:
Bernardo Meurer 2021-09-02 12:20:50 -07:00
parent e4459e59a2
commit e3b026fdba
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246
5 changed files with 25 additions and 19 deletions

View file

@ -1,4 +1,5 @@
{ lib, stdenv
{ stdenv
, lib
, fetchFromGitHub
, cmake
, python3
@ -65,7 +66,7 @@ stdenv.mkDerivation rec {
description = "ROCm fork of the clang C/C++/Objective-C/Objective-C++ LLVM compiler frontend";
homepage = "https://llvm.org/";
license = with licenses; [ ncsa ];
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
platforms = platforms.linux;
};
}

View file

@ -54,4 +54,12 @@ stdenv.mkDerivation rec {
'';
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;
};
}

View file

@ -1,12 +1,12 @@
{ stdenv, lib, buildPackages, fetchFromGitHub, callPackage, wrapCCWith, overrideCC }:
let
version = "4.1.0";
version = "4.3.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "llvm-project";
rev = "rocm-${version}";
hash = "sha256-DlId/dF5r0ULl2omYPCyu1Ic3XKlLL7ndiCA0RaF264=";
hash = "sha256-7XVtHcrTpw+NYUvuKQFWWFE0FlOTt8EnfZpvepQqE1c=";
};
in 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.-]+"`
rsrc="$out/resource-root"
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 "--gcc-toolchain=${stdenv.cc.cc}" >> $out/nix-support/cc-cflags
echo "-Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
rm $out/nix-support/add-hardening.sh
touch $out/nix-support/add-hardening.sh
@ -52,7 +54,6 @@ in rec {
lld = callPackage ./lld.nix {
inherit llvm version;
src = "${src}/lld";
buildLlvmTools = buildPackages.llvmPackages_rocm;
};
llvm = callPackage ./llvm {

View file

@ -1,5 +1,5 @@
{ lib, stdenv
, buildLlvmTools
{ stdenv
, lib
, cmake
, libxml2
, llvm
@ -14,18 +14,13 @@ stdenv.mkDerivation rec {
pname = "lld";
nativeBuildInputs = [ cmake ];
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" ];
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$dev"
@ -39,7 +34,7 @@ stdenv.mkDerivation rec {
description = "ROCm fork of the LLVM Linker";
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
license = licenses.ncsa;
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
platforms = platforms.linux;
};
}

View file

@ -1,4 +1,5 @@
{ lib, stdenv
{ stdenv
, lib
, fetchFromGitHub
, cmake
, python3
@ -91,7 +92,7 @@ in stdenv.mkDerivation rec {
description = "ROCm fork of the LLVM compiler infrastructure";
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
license = with licenses; [ ncsa ];
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ acowley danieldk lovesegfault ];
platforms = platforms.linux;
};
}