llvmPackages_11.libclc: 2019-06-09 -> 11.0.1 (#111065)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
792e8ee8cd
commit
8c9748cd5e
1 changed files with 16 additions and 19 deletions
|
@ -1,35 +1,32 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, python3, llvmPackages }:
|
{ lib, stdenv, fetchFromGitHub, ninja, cmake, python3, llvmPackages }:
|
||||||
|
|
||||||
let
|
let
|
||||||
llvm = llvmPackages.llvm;
|
llvm = llvmPackages.llvm;
|
||||||
clang = llvmPackages.clang;
|
|
||||||
clang-unwrapped = llvmPackages.clang-unwrapped;
|
clang-unwrapped = llvmPackages.clang-unwrapped;
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "libclc-2019-06-09";
|
pname = "libclc";
|
||||||
|
version = "11.0.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "llvm-mirror";
|
owner = "llvm";
|
||||||
repo = "libclc";
|
repo = "llvm-project";
|
||||||
rev = "9f6204ec04a8cadb6bef57caa71e3161c4f398f2";
|
rev = "llvmorg-${version}";
|
||||||
sha256 = "03l9frx3iw3qdsb9rrscgzdwm6872gv6mkssvn027ndf9y321xk7";
|
sha256 = "0bxh43hp1vl4axl3s9n2nb2ii8x1cbq98xz9c996f8rl5jy84ags";
|
||||||
};
|
};
|
||||||
|
sourceRoot = "source/libclc";
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 llvm ];
|
# cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's,llvm_clang =.*,llvm_clang = "${clang-unwrapped}/bin/clang",' configure.py
|
substituteInPlace CMakeLists.txt \
|
||||||
sed -i 's,cxx_compiler =.*,cxx_compiler = "${clang}/bin/clang++",' configure.py
|
--replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_BINDIR} NO_DEFAULT_PATH )' \
|
||||||
|
'find_program( LLVM_CLANG clang PATHS "${clang-unwrapped}/bin" NO_DEFAULT_PATH )'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
nativeBuildInputs = [ cmake ninja python3 ];
|
||||||
${python3.interpreter} ./configure.py --prefix=$out
|
buildInputs = [ llvm clang-unwrapped ];
|
||||||
'';
|
strictDeps = true;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://libclc.llvm.org/";
|
homepage = "http://libclc.llvm.org/";
|
||||||
|
|
Loading…
Reference in a new issue