diff --git a/pkgs/development/compilers/llvm/clang-tablegen-dir.patch b/pkgs/development/compilers/llvm/clang-tablegen-dir.patch new file mode 100644 index 000000000000..de6a468b239f --- /dev/null +++ b/pkgs/development/compilers/llvm/clang-tablegen-dir.patch @@ -0,0 +1,9 @@ +--- a/utils/TableGen/CMakeLists.txt (revision 190146) ++++ b/utils/TableGen/CMakeLists.txt (working copy) +@@ -1,4 +1,5 @@ + set(LLVM_LINK_COMPONENTS Support) ++set(LLVM_TOOLS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) + + add_tablegen(clang-tblgen CLANG + ClangASTNodesEmitter.cpp + diff --git a/pkgs/development/compilers/llvm/clang.nix b/pkgs/development/compilers/llvm/clang.nix index df58591973e6..8c178c9ce037 100644 --- a/pkgs/development/compilers/llvm/clang.nix +++ b/pkgs/development/compilers/llvm/clang.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation { buildInputs = [ perl llvm groff cmake libxml2 python ]; - patches = stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch; + patches = [ ./clang-tablegen-dir.patch ] ++ + stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch; cmakeFlags = [ "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"