clang_31: Allow clang to find system includes in gcc dirs.
Backported fix.
This commit is contained in:
parent
b5a560d76a
commit
69af3f4a78
@ -1,6 +1,9 @@
|
|||||||
{ stdenv, fetchurl, perl, groff, llvm, cmake }:
|
{ stdenv, fetchurl, perl, groff, llvm, cmake }:
|
||||||
|
|
||||||
let version = "3.1"; in
|
let
|
||||||
|
version = "3.1";
|
||||||
|
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "clang-${version}";
|
name = "clang-${version}";
|
||||||
@ -14,6 +17,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
|
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
"-DLLVM_TARGETS_TO_BUILD=all"
|
"-DLLVM_TARGETS_TO_BUILD=all"
|
||||||
|
"-DGCC_INSTALL_PREFIX=${gccReal}"
|
||||||
] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
|
] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
|
||||||
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
|
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
|
||||||
];
|
];
|
||||||
@ -31,7 +35,7 @@ stdenv.mkDerivation {
|
|||||||
homepage = http://clang.llvm.org/;
|
homepage = http://clang.llvm.org/;
|
||||||
description = "A C language family frontend for LLVM";
|
description = "A C language family frontend for LLVM";
|
||||||
license = "BSD";
|
license = "BSD";
|
||||||
maintainers = with stdenv.lib.maintainers; [viric shlevy];
|
maintainers = with stdenv.lib.maintainers; [viric shlevy vlstill];
|
||||||
platforms = with stdenv.lib.platforms; all;
|
platforms = with stdenv.lib.platforms; all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user