Skip to content

Commit 0594d22

Browse files
committed
---
yaml --- r: 346729 b: refs/heads/master c: e96ddfd h: refs/heads/master i: 346727: 01fb476
1 parent 05759aa commit 0594d22

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b683ca550b198ba06147da9a3451cefece8ec2cb
2+
refs/heads/master: e96ddfd9ad678aa489532864ce5aeed1b2398a55
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/stdlib/public/SwiftOnoneSupport/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,19 @@ add_swift_target_library(swiftSwiftOnoneSupport ${SWIFT_STDLIB_LIBRARY_BUILD_TYP
99
SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
1010
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
1111
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()

0 commit comments

Comments
 (0)