File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -217,17 +217,22 @@ function(add_properties_for_swift_modules target reldir)
217
217
# Workaround for a linker crash related to autolinking: rdar://77839981
218
218
set_property (TARGET ${target} APPEND_STRING PROPERTY
219
219
LINK_FLAGS " -lobjc " )
220
+
221
+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
222
+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
220
223
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
221
224
string (REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE} )
222
225
target_link_libraries (${target} PRIVATE swiftCore-linux-${arch} )
223
226
string (TOLOWER ${CMAKE_SYSTEM_NAME} platform)
224
227
set (SWIFT_BUILD_RPATH "${LLDB_SWIFT_LIBS} /${platform} " )
225
228
set (SWIFT_INSTALL_RPATH "$ORIGIN/${reldir} lib/swift/${platform} " )
229
+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
230
+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
231
+ elseif (CMAKE_SYSTEM_NAME MATCHES Windows)
232
+ target_link_directories (${target} PRIVATE
233
+ ${SWIFT_PATH_TO_SWIFT_SDK} /usr/lib/swift/Windows/x86_64)
226
234
endif ()
227
235
228
- set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
229
- set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
230
-
231
236
if (SWIFT_SWIFT_PARSER)
232
237
if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
233
238
set_property (TARGET ${target}
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ endif( MSVC OR MINGW )
79
79
# Delay load shell32.dll if possible to speed up process startup.
80
80
set (delayload_flags)
81
81
if (MSVC )
82
- set (delayload_flags delayimp -delayload:shell32.dll -delayload:ole32.dll)
82
+ set (delayload_flags $<$< NOT :$<LINK_LANGUAGE:Swift>>: delayimp -delayload:shell32.dll -delayload:ole32.dll> )
83
83
endif ()
84
84
85
85
# Link Z3 if the user wants to build it.
You can’t perform that action at this time.
0 commit comments