Merge pull request #26099 from dtzWill/fix/lldb-libedit

lldb-4: Patch to fix libedit usage on Linux

authored by Daiderd Jordan and committed by GitHub 4e88e82e 789bde24

+32 -5
+30
pkgs/development/compilers/llvm/4/lldb-libedit.patch
··· 1 + From 94764369222a8e6c65420a6981d7f179a18a5417 Mon Sep 17 00:00:00 2001 2 + From: Will Dietz <w@wdtz.org> 3 + Date: Thu, 25 May 2017 15:03:42 -0500 4 + Subject: [PATCH] EditLine.h: libedit supports wide chars on NixOS 5 + 6 + --- 7 + include/lldb/Host/Editline.h | 5 +---- 8 + 1 file changed, 1 insertion(+), 4 deletions(-) 9 + 10 + diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h 11 + index faed373bc..b248cdee1 100644 12 + --- a/include/lldb/Host/Editline.h 13 + +++ b/include/lldb/Host/Editline.h 14 + @@ -43,12 +43,9 @@ 15 + // will only be 16 + // used in cases where this is true. This is a compile time dependecy, for now 17 + // selected per target Platform 18 + -#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) 19 + +// (libedit on NixOS is always wide-char capable) 20 + #define LLDB_EDITLINE_USE_WCHAR 1 21 + #include <codecvt> 22 + -#else 23 + -#define LLDB_EDITLINE_USE_WCHAR 0 24 + -#endif 25 + 26 + #include "lldb/Host/ConnectionFileDescriptor.h" 27 + #include "lldb/lldb-private.h" 28 + -- 29 + 2.13.0 30 +
+2 -5
pkgs/development/compilers/llvm/4/lldb.nix
··· 19 19 20 20 src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d"; 21 21 22 - patchPhase = '' 22 + patches = [ ./lldb-libedit.patch ]; 23 + postPatch = '' 23 24 # Fix up various paths that assume llvm and clang are installed in the same place 24 25 sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \ 25 26 cmake/modules/LLDBStandalone.cmake ··· 34 35 35 36 CXXFLAGS = "-fno-rtti"; 36 37 hardeningDisable = [ "format" ]; 37 - 38 - cmakeFlags = [ 39 - "-DLLDB_DISABLE_LIBEDIT=ON" 40 - ]; 41 38 42 39 enableParallelBuilding = true; 43 40