3
0
Fork 0
forked from mirrors/nixpkgs

llvmPackages_git.lldb: python into lib & wrap binary

Ported from cc7740ae77.
This commit is contained in:
Michael Weiss 2021-08-08 13:56:25 +02:00
parent cab7daf2c1
commit 9b10cb2cba
No known key found for this signature in database
GPG key ID: 5BE487C4D4771D83
2 changed files with 19 additions and 3 deletions

View file

@ -19,6 +19,7 @@
, Carbon
, Cocoa
, lit
, makeWrapper
, enableManpages ? false
}:
@ -42,7 +43,7 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" ];
nativeBuildInputs = [
cmake python3 which swig lit
cmake python3 which swig lit makeWrapper
] ++ lib.optionals enableManpages [
python3.pkgs.sphinx python3.pkgs.recommonmark
];
@ -85,12 +86,14 @@ stdenv.mkDerivation (rec {
doCheck = false;
installCheckPhase = ''
if [ ! -e "$out/lib/python3.8/site-packages/lldb/_lldb.so" ] ; then
if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then
return 1;
fi
'';
postInstall = ''
wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
# Editor support
# vscode:
install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json

View file

@ -75,4 +75,17 @@ index 752113b..010f187 100644
+set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 OR CYGWIN)
# DLL platform -- put DLLs into bin.
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5633e2..86e4738 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
if(LLDB_BUILD_FRAMEWORK)
set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
else()
- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
+ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
endif()
get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")