Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion llvm/lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
set (delayload_flags)
if (MSVC)
set (delayload_flags delayimp -delayload:shell32.dll -delayload:ole32.dll)
# When linking with Swift, `swiftc.exe` is used as the linker drive rather
# than invoking `link.exe` directly. In such a case, the flags should be
# marked as `-Xlinker` to pass them directly to the linker. As a temporary
# workaround simply elide the delay loading.
set (delayload_flags $<$<NOT:$<LINK_LANGUAGE:Swift>>:delayimp -delayload:shell32.dll -delayload:ole32.dll>)
endif()

# Link Z3 if the user wants to build it.
Expand Down