File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
stdlib/public/SwiftOnoneSupport Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,19 @@ add_swift_target_library(swiftSwiftOnoneSupport ${SWIFT_STDLIB_LIBRARY_BUILD_TYP
9
9
SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS} "
10
10
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS} "
11
11
INSTALL_IN_COMPONENT stdlib )
12
+ if (CMAKE_BUILD_TYPE STREQUAL Debug AND WINDOWS IN_LIST SWIFT_SDKS )
13
+ # When building in Debug mode, the standard library provides the symbols that
14
+ # we need and as such SwiftOnoneSupport does not need to provide any exported
15
+ # interfaces. This results in the import library beinging elided. However,
16
+ # we explicitly link against the SwiftOnoneSupport library when building
17
+ # programs in Debug mode, and need the import library to be generated even if
18
+ # nothing is exported. Because we will still generate the DLL, create an
19
+ # empty import library.
20
+ file (WRITE ${CMAKE_CURRENT_BINARY_DIR} /SwiftOnoneSupport.def
21
+ "LIBRARY SwiftOnoneSupport\n "
22
+ "EXPORTS" )
23
+ foreach (architecture ${SWIFT_SDK_WINDOWS_ARCHITECTURES} )
24
+ target_sources (swiftSwiftOnoneSupport-windows-${architecture} PRIVATE
25
+ ${CMAKE_CURRENT_BINARY_DIR} /SwiftOnoneSupport.def )
26
+ endforeach ()
27
+ endif ()
You can’t perform that action at this time.
0 commit comments