mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
Merge pull request #26099 from dtzWill/fix/lldb-libedit
lldb-4: Patch to fix libedit usage on Linux
This commit is contained in:
commit
4e88e82e06
2 changed files with 32 additions and 5 deletions
30
pkgs/development/compilers/llvm/4/lldb-libedit.patch
Normal file
30
pkgs/development/compilers/llvm/4/lldb-libedit.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
From 94764369222a8e6c65420a6981d7f179a18a5417 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Will Dietz <w@wdtz.org>
|
||||||
|
Date: Thu, 25 May 2017 15:03:42 -0500
|
||||||
|
Subject: [PATCH] EditLine.h: libedit supports wide chars on NixOS
|
||||||
|
|
||||||
|
---
|
||||||
|
include/lldb/Host/Editline.h | 5 +----
|
||||||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
|
||||||
|
index faed373bc..b248cdee1 100644
|
||||||
|
--- a/include/lldb/Host/Editline.h
|
||||||
|
+++ b/include/lldb/Host/Editline.h
|
||||||
|
@@ -43,12 +43,9 @@
|
||||||
|
// will only be
|
||||||
|
// used in cases where this is true. This is a compile time dependecy, for now
|
||||||
|
// selected per target Platform
|
||||||
|
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
+// (libedit on NixOS is always wide-char capable)
|
||||||
|
#define LLDB_EDITLINE_USE_WCHAR 1
|
||||||
|
#include <codecvt>
|
||||||
|
-#else
|
||||||
|
-#define LLDB_EDITLINE_USE_WCHAR 0
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#include "lldb/Host/ConnectionFileDescriptor.h"
|
||||||
|
#include "lldb/lldb-private.h"
|
||||||
|
--
|
||||||
|
2.13.0
|
||||||
|
|
|
@ -19,7 +19,8 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d";
|
src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d";
|
||||||
|
|
||||||
patchPhase = ''
|
patches = [ ./lldb-libedit.patch ];
|
||||||
|
postPatch = ''
|
||||||
# Fix up various paths that assume llvm and clang are installed in the same place
|
# Fix up various paths that assume llvm and clang are installed in the same place
|
||||||
sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
|
sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
|
||||||
cmake/modules/LLDBStandalone.cmake
|
cmake/modules/LLDBStandalone.cmake
|
||||||
|
@ -35,10 +36,6 @@ stdenv.mkDerivation {
|
||||||
CXXFLAGS = "-fno-rtti";
|
CXXFLAGS = "-fno-rtti";
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DLLDB_DISABLE_LIBEDIT=ON"
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in a new issue