[Lldb-commits] [PATCH] D116853: [CMake][LLDB] Resolve install conflict when `LLDB_BUILD_FRAMEWORK=ON`
LJC via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 7 21:58:07 PST 2022
paperchalice created this revision.
paperchalice added a reviewer: mgorny.
paperchalice added a project: LLDB.
Herald added a subscriber: JDevlieghere.
paperchalice requested review of this revision.
Herald added a subscriber: lldb-commits.
Try to fix https://github.com/llvm/llvm-project/issues/108
- skip install `lldb-python-scripts` when `LLDB_BUILD_FRAMEWORK=ON`
- add `@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}` to `rpath` when `LLDB_BUILD_FRAMEWORK=ON`
`LLDB.framework/Resources/Python` is installed by target `lldb-python-scripts` and `liblldb`, so
`cmake --install build` will fail with `CMake Error: failed to create symbolic link '~/buildspace/llvm-inst/Library/Frameworks/LLDB.framework/Resources': file already exists`
The rpath seems incorrect after `ninja install`, so I add `@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}` to the rpath list.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116853
Files:
lldb/bindings/python/CMakeLists.txt
lldb/tools/driver/CMakeLists.txt
lldb/tools/lldb-vscode/CMakeLists.txt
Index: lldb/tools/lldb-vscode/CMakeLists.txt
===================================================================
--- lldb/tools/lldb-vscode/CMakeLists.txt
+++ lldb/tools/lldb-vscode/CMakeLists.txt
@@ -57,5 +57,6 @@
"@loader_path/../../../SharedFrameworks"
"@loader_path/../../System/Library/PrivateFrameworks"
"@loader_path/../../Library/PrivateFrameworks"
+ "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}"
)
endif()
Index: lldb/tools/driver/CMakeLists.txt
===================================================================
--- lldb/tools/driver/CMakeLists.txt
+++ lldb/tools/driver/CMakeLists.txt
@@ -44,5 +44,6 @@
"@loader_path/../../../SharedFrameworks"
"@loader_path/../../System/Library/PrivateFrameworks"
"@loader_path/../../Library/PrivateFrameworks"
+ "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}"
)
endif()
Index: lldb/bindings/python/CMakeLists.txt
===================================================================
--- lldb/bindings/python/CMakeLists.txt
+++ lldb/bindings/python/CMakeLists.txt
@@ -170,9 +170,11 @@
set(python_scripts_install_target "install-${python_scripts_target}")
add_custom_target(${python_scripts_target})
add_dependencies(${python_scripts_target} ${swig_target})
- install(DIRECTORY ${lldb_python_target_dir}/../
- DESTINATION ${LLDB_PYTHON_INSTALL_PATH}
- COMPONENT ${python_scripts_target})
+ if(NOT LLDB_BUILD_FRAMEWORK)
+ install(DIRECTORY ${lldb_python_target_dir}/../
+ DESTINATION ${LLDB_PYTHON_INSTALL_PATH}
+ COMPONENT ${python_scripts_target})
+ endif()
if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(${python_scripts_install_target}
COMPONENT ${python_scripts_target}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116853.398298.patch
Type: text/x-patch
Size: 1775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220108/3693fa31/attachment-0001.bin>
More information about the lldb-commits
mailing list