Skip to content

Commit 22a2209

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
1 parent dd2a1fe commit 22a2209

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
@@ -135,11 +135,19 @@ if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX A
135135
endif()
136136

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

142-
143151
if(LLDB_ENABLE_PYTHON)
144152
add_dependencies(liblldb swig_wrapper_python)
145153

0 commit comments

Comments
 (0)