From 2c9f0e059ab5cf7acc4769f1dfd8cf1a4e3c3663 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Sat, 7 Sep 2013 11:04:31 +0200 Subject: [PATCH] clang: Do not try to build clang-tblgen in LLVM's build path. --- pkgs/development/compilers/llvm/clang-tablegen-dir.patch | 9 +++++++++ pkgs/development/compilers/llvm/clang.nix | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/llvm/clang-tablegen-dir.patch 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 00000000000..de6a468b239 --- /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 df58591973e..8c178c9ce03 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}"