Skip to content

Commit 7f6afa0

Browse files
committed
[SourceKit/CMake] Make sure the XPC service executable isn't linked with an absolute build directory rpath
rdar://40462455
1 parent f80d113 commit 7f6afa0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ macro(add_sourcekit_xpc_service name framework_target)
428428

429429
add_dependencies(${framework_target} ${name})
430430

431+
set_target_properties(${name} PROPERTIES
432+
BUILD_WITH_INSTALL_RPATH On
433+
INSTALL_RPATH "@loader_path/../lib"
434+
INSTALL_NAME_DIR "@rpath")
435+
431436
if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
432437
add_custom_command(TARGET ${name} POST_BUILD
433438
COMMAND ${CMAKE_COMMAND} -E create_symlink "Versions/Current/XPCServices" XPCServices

0 commit comments

Comments
 (0)