tbb: clang support
Added compiler and stdver parameters, to support non-gcc compilers, and enable perfect exception forwarding (std::exception_ptr) on platforms where C++11 is not enabled by default
This commit is contained in:
parent
2ede55a37b
commit
49e66285b2
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub }:
|
{ stdenv, fetchFromGitHub, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
with stdenv.lib; stdenv.mkDerivation rec {
|
||||||
name = "tbb-${version}";
|
name = "tbb-${version}";
|
||||||
version = "2018_U1";
|
version = "2018_U1";
|
||||||
|
|
||||||
@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1lygz07va6hsv2vlx9zwz5d2n81rxsdhmh0pqxgj8n1bvb1rp0qw";
|
sha256 = "1lygz07va6hsv2vlx9zwz5d2n81rxsdhmh0pqxgj8n1bvb1rp0qw";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
makeFlags = concatStringsSep " " (
|
||||||
|
optional (compiler != null) "compiler=${compiler}" ++
|
||||||
|
optional (stdver != null) "stdver=${stdver}"
|
||||||
|
);
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{lib,share/doc}
|
mkdir -p $out/{lib,share/doc}
|
||||||
cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
|
cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
|
||||||
@ -21,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = {
|
||||||
description = "Intel Thread Building Blocks C++ Library";
|
description = "Intel Thread Building Blocks C++ Library";
|
||||||
homepage = "http://threadingbuildingblocks.org/";
|
homepage = "http://threadingbuildingblocks.org/";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user