File tree 3 files changed +20
-14
lines changed
3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ option(SWIFT_INCLUDE_DOCS
93
93
"Create targets for building docs."
94
94
TRUE )
95
95
96
+ set (_swift_include_apinotes_default FALSE )
97
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
98
+ set (_swift_include_apinotes_default TRUE )
99
+ endif ()
100
+
101
+ option (SWIFT_INCLUDE_APINOTES
102
+ "Create targets for installing the remaining apinotes in the built toolchain."
103
+ ${_swift_include_apinotes_default} )
104
+
96
105
#
97
106
# Miscellaneous User-configurable options.
98
107
#
@@ -1042,12 +1051,8 @@ endif()
1042
1051
# https://bugs.swift.org/browse/SR-5975
1043
1052
add_subdirectory (stdlib)
1044
1053
1045
- if (SWIFT_BUILD_SDK_OVERLAY)
1046
- list_intersect("${SWIFT_APPLE_PLATFORMS} " "${SWIFT_SDKS} "
1047
- building_darwin_sdks)
1048
- if (building_darwin_sdks)
1049
- add_subdirectory (apinotes)
1050
- endif ()
1054
+ if (SWIFT_INCLUDE_APINOTES)
1055
+ add_subdirectory (apinotes)
1051
1056
endif ()
1052
1057
1053
1058
add_subdirectory (include )
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ add_custom_target("copy_apinotes"
28
28
COMMENT "Copying API notes to ${output_dir} "
29
29
SOURCES "${sources} " )
30
30
31
- # This is treated as an OPTIONAL target because if we don't build the SDK
32
- # overlay, the files will be missing anyway. It also allows us to build
33
- # single overlays without installing the API notes.
34
31
swift_install_in_component(DIRECTORY "${output_dir} "
35
32
DESTINATION "lib/swift/"
36
- COMPONENT sdk-overlay
37
- OPTIONAL )
33
+ COMPONENT compiler)
Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ set(swift_platform_sources
4
4
set (swift_platform_gyb_sources
5
5
tgmath.swift.gyb)
6
6
7
+ set (darwin_depends)
8
+ if (NOT BUILD_STANDALONE)
9
+ # This is overly conservative, but we have so few API notes files that
10
+ # haven't migrated to the Swift repo that it's probably fine in practice.
11
+ list (APPEND darwin_depends copy_apinotes)
12
+ endif ()
13
+
7
14
add_swift_target_library(swiftDarwin ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
8
15
${swift_platform_sources}
9
16
POSIXError.swift
@@ -19,9 +26,7 @@ add_swift_target_library(swiftDarwin ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_SDK_
19
26
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS} "
20
27
TARGET_SDKS ALL_APPLE_PLATFORMS
21
28
22
- # This is overly conservative, but we have so few API notes files that
23
- # haven't migrated to the Swift repo that it's probably fine in practice.
24
- DEPENDS copy_apinotes)
29
+ DEPENDS ${darwin_depends} )
25
30
26
31
add_swift_target_library(swiftGlibc ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
27
32
${swift_platform_sources}
You can’t perform that action at this time.
0 commit comments