File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1237,6 +1237,19 @@ function(add_swift_library name)
1237
1237
elseif ("${sdk} " STREQUAL "WATCHOS" OR "${sdk} " STREQUAL "WATCHOS_SIMULATOR" )
1238
1238
list (APPEND swiftlib_swift_compile_flags_all
1239
1239
${SWIFTLIB_SWIFT_COMPILE_FLAGS_WATCHOS} )
1240
+ elseif ("${sdk} " STREQUAL "WINDOWS" )
1241
+ # FIXME(SR2005) static and shared are not mutually exclusive; however
1242
+ # since we do a single build of the sources, this doesnt work for
1243
+ # building both simultaneously. Effecitvely, only shared builds are
1244
+ # supported on windows currently.
1245
+ if (SWIFTLIB_SHARED )
1246
+ list (APPEND swiftlib_swift_compile_flags_all -D_USRDLL )
1247
+ if (SWIFTLIB_IS_STDLIB_CORE )
1248
+ list (APPEND swiftlib_swift_compile_flags_all -DswiftCore_EXPORTS )
1249
+ endif ()
1250
+ elseif (SWIFTLIB_STATIC )
1251
+ list (APPEND swiftlib_swift_compile_flags_all -D_LIB )
1252
+ endif ()
1240
1253
endif ()
1241
1254
1242
1255
# Add this library variant.
Original file line number Diff line number Diff line change 63
63
# if defined(__CYGWIN__)
64
64
# define SWIFT_RUNTIME_EXPORT
65
65
# else
66
- # if defined(__SWIFT_CURRENT_DYLIB )
66
+ # if defined(swiftCore_EXPORTS )
67
67
# define SWIFT_RUNTIME_EXPORT __declspec (dllexport)
68
68
# else
69
- # define SWIFT_RUNTIME_EXPORT
69
+ # define SWIFT_RUNTIME_EXPORT __declspec (dllimport)
70
70
# endif
71
71
# endif
72
72
#endif
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ add_swift_library(swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY
67
67
${swift_runtime_sources}
68
68
${swift_runtime_objc_sources}
69
69
${swift_runtime_leaks_sources}
70
- C_COMPILE_FLAGS ${swift_runtime_compile_flags}
70
+ C_COMPILE_FLAGS ${swift_runtime_compile_flags} -DswiftCore_EXPORTS
71
71
INSTALL_IN_COMPONENT never_install )
72
72
73
73
set (ELFISH_SDKS )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ add_swift_library(swiftStdlibStubs OBJECT_LIBRARY TARGET_LIBRARY
22
22
UnicodeExtendedGraphemeClusters.cpp.gyb
23
23
${swift_stubs_objc_sources}
24
24
${swift_stubs_unicode_normalization_sources}
25
- C_COMPILE_FLAGS ${SWIFT_CORE_CXX_FLAGS}
25
+ C_COMPILE_FLAGS ${SWIFT_CORE_CXX_FLAGS} -DswiftCore_EXPORTS
26
26
LINK_LIBRARIES ${swift_stubs_link_libraries}
27
27
INSTALL_IN_COMPONENT stdlib )
28
28
You can’t perform that action at this time.
0 commit comments