forked from mirrors/nixpkgs
llvmPackages_13.lldb: python into lib & wrap binary
Ported from cc7740ae77
.
This commit is contained in:
parent
a6defaf953
commit
a5f0733461
|
@ -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
|
||||
|
|
|
@ -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}")
|
||||
|
|
Loading…
Reference in a new issue