@@ -21,17 +21,12 @@ endif()
21
21
list (APPEND swift_runtime_compile_flags
22
22
"-D__SWIFT_CURRENT_DYLIB=swiftCore" )
23
23
24
- set (swift_runtime_objc_sources )
25
- set (swift_runtime_unicode_normalization_sources )
26
- if (SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_VARIANTS} " )
27
- set (swift_runtime_objc_sources
28
- ErrorObject.mm
29
- SwiftObject.mm
30
- SwiftValue.mm
31
- Remangle.cpp
32
- Reflection.mm )
33
- else ()
34
- endif ()
24
+ set (swift_runtime_objc_sources
25
+ ErrorObject.mm
26
+ SwiftObject.mm
27
+ SwiftValue.mm
28
+ Remangle.cpp
29
+ Reflection.mm )
35
30
36
31
set (swift_runtime_sources
37
32
AnyHashableSupport.cpp
@@ -68,13 +63,25 @@ set(LLVM_OPTIONAL_SOURCES
68
63
${swift_runtime_objc_sources}
69
64
${swift_runtime_leaks_sources} )
70
65
66
+ set (swift_runtime_library_compile_flags ${swift_runtime_compile_flags} )
67
+ list (APPEND swift_runtime_library_compile_flags -DswiftCore_EXPORTS )
68
+
71
69
add_swift_library (swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY
72
70
${swift_runtime_sources}
73
71
${swift_runtime_objc_sources}
74
72
${swift_runtime_leaks_sources}
75
- C_COMPILE_FLAGS ${swift_runtime_compile_flags} -DswiftCore_EXPORTS
73
+ C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
74
+ LINK_FLAGS ${swift_runtime_linker_flags}
75
+ INSTALL_IN_COMPONENT never_install
76
+ TARGET_SDKS ALL_APPLE_PLATFORMS )
77
+
78
+ add_swift_library (swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY
79
+ ${swift_runtime_sources}
80
+ ${swift_runtime_leaks_sources}
81
+ C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
76
82
LINK_FLAGS ${swift_runtime_linker_flags}
77
- INSTALL_IN_COMPONENT never_install )
83
+ INSTALL_IN_COMPONENT never_install
84
+ TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX )
78
85
79
86
set (ELFISH_SDKS )
80
87
foreach (sdk ${SWIFT_CONFIGURED_SDKS} )
0 commit comments