diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/4/lldb.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/4/lldb.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/4/lldb.nix b/pkgs/development/compilers/llvm/4/lldb.nix new file mode 100644 index 000000000000..23667e6afcd7 --- /dev/null +++ b/pkgs/development/compilers/llvm/4/lldb.nix @@ -0,0 +1,50 @@ +{ stdenv +, fetch +, cmake +, zlib +, ncurses +, swig +, which +, libedit +, libxml2 +, llvm +, clang-unwrapped +, python +, version +, darwin +}: + +stdenv.mkDerivation { + name = "lldb-${version}"; + + src = fetch "lldb" "1qr0ky7llwgjgx1pzkp3pnz32nb6f7lvg8qg6rp5axhgpkx54hz7"; + + patchPhase = '' + # 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",' \ + cmake/modules/LLDBStandalone.cmake + sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \ + cmake/modules/LLDBStandalone.cmake + sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \ + cmake/modules/LLDBStandalone.cmake + ''; + + buildInputs = [ cmake python which swig ncurses zlib libedit libxml2 llvm ] + ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc ]; + + CXXFLAGS = "-fno-rtti"; + hardeningDisable = [ "format" ]; + + cmakeFlags = [ + "-DLLDB_DISABLE_LIBEDIT=ON" + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A next-generation high-performance debugger"; + homepage = http://llvm.org/; + license = licenses.ncsa; + platforms = platforms.allBut platforms.darwin; + }; +} |