From 838dae41887ef044a93655830d7b563e3acc391b Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Mon, 21 Nov 2022 21:37:41 -0800 Subject: [PATCH] First clang patch --- pkgs/development/interpreters/cling/default.nix | 8 ++++++++ .../interpreters/cling/no-clang-cpp.patch | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/interpreters/cling/no-clang-cpp.patch diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix index d73da5cf21b1..5165afb4b9cd 100644 --- a/pkgs/development/interpreters/cling/default.nix +++ b/pkgs/development/interpreters/cling/default.nix @@ -24,6 +24,7 @@ let rev = "cling-v0.9"; sha256 = "sha256-ft1NUIclSiZ9lN3Z3DJCWA0U9q/K1M0TKkZr+PjsFYk="; }; + # src = /home/tom/tools/clang; clingSrc = fetchFromGitHub { owner = "root-project"; @@ -31,6 +32,7 @@ let rev = "v0.9"; sha256 = "0wx3fi19wfjcph5kclf8108i436y79ddwakrcf0lgxnnxhdjyd29"; }; + # clingSrc = /home/tom/tools/cling; preConfigure = '' echo "add_llvm_external_project(cling)" >> tools/CMakeLists.txt @@ -41,6 +43,10 @@ let nativeBuildInputs = [ python3 git cmake llvmPackages_9.llvm.dev ]; buildInputs = [ libffi llvmPackages_9.llvm zlib ncurses ]; + patches = [ + ./no-clang-cpp.patch + ]; + strictDeps = true; cmakeFlags = [ @@ -50,6 +56,8 @@ let # Setting -DCLING_INCLUDE_TESTS=ON causes the cling/tools targets to be built; # see cling/tools/CMakeLists.txt "-DCLING_INCLUDE_TESTS=ON" + "-DCLANG-TOOLS=OFF" + # "--trace-expand" ]; meta = with lib; { diff --git a/pkgs/development/interpreters/cling/no-clang-cpp.patch b/pkgs/development/interpreters/cling/no-clang-cpp.patch new file mode 100644 index 000000000000..6048037cee84 --- /dev/null +++ b/pkgs/development/interpreters/cling/no-clang-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt +index 590d708d83..340ae529d4 100644 +--- a/tools/driver/CMakeLists.txt ++++ b/tools/driver/CMakeLists.txt +@@ -63,7 +63,7 @@ endif() + add_dependencies(clang clang-resource-headers) + + if(NOT CLANG_LINKS_TO_CREATE) +- set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp) ++ set(CLANG_LINKS_TO_CREATE clang++ clang-cl) + endif() + + foreach(link ${CLANG_LINKS_TO_CREATE})