Skip to content

Commit 52b64e5

Browse files
committed
[SourceKit] Make sure we link the compiler plugin support library
1 parent 34b6208 commit 52b64e5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,9 +912,9 @@ function(add_swift_host_tool executable)
912912
endif()
913913
914914
if(SWIFT_SWIFT_PARSER)
915-
set_property(
916-
TARGET ${executable}
917-
APPEND PROPERTY INSTALL_RPATH "@executable_path/../lib")
915+
set_property(
916+
TARGET ${executable}
917+
APPEND PROPERTY INSTALL_RPATH "@executable_path/../lib")
918918
endif()
919919
920920
if(ASHT_THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY)

tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,10 @@ macro(add_sourcekit_framework name)
430430
LIBRARY_DIR ${SOURCEKIT_LIBRARY_OUTPUT_INTDIR})
431431
set(RPATH_LIST)
432432
add_sourcekit_swift_runtime_link_flags(${name} "${SOURCEKIT_LIBRARY_OUTPUT_INTDIR}" ${SOURCEKITFW_HAS_SWIFT_MODULES})
433+
file(RELATIVE_PATH relative_lib_path
434+
"${framework_location}/Versions/A" "${SOURCEKIT_LIBRARY_OUTPUT_INTDIR}")
435+
list(APPEND RPATH_LIST "@loader_path/${relative_lib_path}")
436+
433437
set_target_properties(${name} PROPERTIES
434438
BUILD_WITH_INSTALL_RPATH TRUE
435439
FOLDER "SourceKit frameworks"
@@ -461,6 +465,10 @@ macro(add_sourcekit_framework name)
461465
LIBRARY_DIR ${framework_location})
462466
set(RPATH_LIST)
463467
add_sourcekit_swift_runtime_link_flags(${name} "${framework_location}" SOURCEKITFW_HAS_SWIFT_MODULES RPATH_LIST)
468+
file(RELATIVE_PATH relative_lib_path
469+
"${framework_location}" "${SOURCEKIT_LIBRARY_OUTPUT_INTDIR}")
470+
list(APPEND RPATH_LIST "@loader_path/${relative_lib_path}")
471+
464472
set_target_properties(${name} PROPERTIES
465473
BUILD_WITH_INSTALL_RPATH TRUE
466474
FOLDER "SourceKit frameworks"

0 commit comments

Comments
 (0)