clang: add isClang passthru attribute to mirror isGNU

This commit is contained in:
Eric Seidel 2015-03-24 20:37:01 -07:00
parent 6f025832b5
commit 69d02b71a0
4 changed files with 18 additions and 7 deletions

View File

@ -29,7 +29,11 @@ stdenv.mkDerivation {
sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
};
passthru = { cc = stdenv.cc.cc; gcc = gccReal; };
passthru = {
isClang = true;
cc = stdenv.cc.cc;
gcc = gccReal;
};
meta = {
homepage = http://clang.llvm.org/;

View File

@ -34,10 +34,13 @@ stdenv.mkDerivation {
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
'';
passthru.cc = stdenv.cc.cc;
passthru = {
isClang = true;
cc = stdenv.cc.cc;
# GCC_INSTALL_PREFIX points here, so just use it even though it may not
# actually be a gcc
passthru.gcc = stdenv.cc.cc;
gcc = stdenv.cc.cc;
};
enableParallelBuilding = true;

View File

@ -39,7 +39,9 @@ in stdenv.mkDerivation {
enableParallelBuilding = true;
passthru = stdenv.lib.optionalAttrs stdenv.isLinux {
passthru = {
isClang = true;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
inherit gcc;
};

View File

@ -40,7 +40,9 @@ in stdenv.mkDerivation {
enableParallelBuilding = true;
passthru = stdenv.lib.optionalAttrs stdenv.isLinux {
passthru = {
isClang = true;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
inherit gcc;
};