File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -190,17 +190,22 @@ function(add_properties_for_swift_modules target reldir)
190
190
# Workaround for a linker crash related to autolinking: rdar://77839981
191
191
set_property (TARGET ${target} APPEND_STRING PROPERTY
192
192
LINK_FLAGS " -lobjc " )
193
+
194
+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
195
+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
193
196
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
194
197
string (REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE} )
195
198
target_link_libraries (${target} PRIVATE swiftCore-linux-${arch} )
196
199
string (TOLOWER ${CMAKE_SYSTEM_NAME} platform)
197
200
set (SWIFT_BUILD_RPATH "${LLDB_SWIFT_LIBS} /${platform} " )
198
201
set (SWIFT_INSTALL_RPATH "$ORIGIN/${reldir} lib/swift/${platform} " )
202
+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
203
+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
204
+ elseif (CMAKE_SYSTEM_NAME MATCHES Windows)
205
+ target_link_directories (${target} PRIVATE
206
+ ${SWIFT_PATH_TO_SWIFT_SDK} /usr/lib/swift/Windows/x86_64)
199
207
endif ()
200
208
201
- set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
202
- set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
203
-
204
209
if (SWIFT_SWIFT_PARSER)
205
210
if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
206
211
set_property (TARGET ${target}
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ endif( MSVC OR MINGW )
81
81
# Delay load shell32.dll if possible to speed up process startup.
82
82
set (delayload_flags)
83
83
if (MSVC )
84
- set (delayload_flags delayimp -delayload:shell32.dll -delayload:ole32.dll)
84
+ set (delayload_flags $<$< NOT :$<LINK_LANGUAGE:Swift>>: delayimp -delayload:shell32.dll -delayload:ole32.dll> )
85
85
endif ()
86
86
87
87
# Link Z3 if the user wants to build it.
You can’t perform that action at this time.
0 commit comments