Skip to content

Commit 602604b

Browse files
committed
[CMake] Further cleanup for RUNPATH setting
`$ORIGIN` is only supported in Linux, BSD, etc. (i.e. not in Windows)
1 parent 914a6fd commit 602604b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
151151
else()
152152
message(FATAL_ERROR "Unknown ASKD_BOOTSTRAPPING_MODE '${ASKD_BOOTSTRAPPING_MODE}'")
153153
endif()
154-
endif()
155154

156-
if(SWIFT_SWIFT_PARSER)
157-
# Add rpath to the host Swift libraries.
158-
if (NOT SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
155+
if(SWIFT_SWIFT_PARSER)
156+
# Add rpath to the host Swift libraries.
159157
file(RELATIVE_PATH relative_hostlib_path "${path}" "${SWIFTLIB_DIR}/host")
160158
list(APPEND RPATH_LIST "$ORIGIN/${relative_hostlib_path}")
161159
endif()
160+
endif()
162161

162+
if(SWIFT_SWIFT_PARSER)
163163
# For the "end step" of bootstrapping configurations on Darwin, need to be
164164
# able to fall back to the SDK directory for libswiftCore et al.
165165
if (BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")

0 commit comments

Comments
 (0)