Skip to content

Commit cd36cc0

Browse files
committed
[lldb] Set the correct INSTALL_RPATH for Python3.framework
Don't use the Python3_RPATH as the INSTALL_RPATH as this is not portable across toolchains. Instead, find the Python3.framework relative to where LLDB.framework is installed. rdar://78894526 (cherry picked from commit 22a2209)
1 parent 6cbcb56 commit cd36cc0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,19 @@ if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX A
134134
endif()
135135

136136
if(Python3_RPATH)
137-
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}")
138-
set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
137+
lldb_setup_rpaths(liblldb
138+
BUILD_RPATH
139+
"${Python3_RPATH}"
140+
INSTALL_RPATH
141+
"@loader_path/../../../../../../../../Library/Frameworks/"
142+
"@loader_path/../../../../../Developer/Library/Frameworks/"
143+
"@loader_path/../../../../Developer/Library/Frameworks/"
144+
"@loader_path/../../../../Frameworks"
145+
"@loader_path/../../../"
146+
"/Applications/Xcode.app/Contents/Developer/Library/Frameworks/"
147+
)
139148
endif()
140149

141-
142150
if(LLDB_ENABLE_PYTHON)
143151
add_dependencies(liblldb swig_wrapper_python)
144152

0 commit comments

Comments
 (0)