Skip to content

Commit cfbb97a

Browse files
committed
[cmake] Add an option to enable/disable creation of "sib" stdlib targets and disable it by default.
These aren't really being used and generating these cause unnecessary configure time in cmake.
1 parent 9996f9f commit cfbb97a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
195195
"Generate .swiftinterface files alongside .swiftmodule files"
196196
TRUE)
197197

198+
option(SWIFT_STDLIB_ENABLE_SIB_TARGETS
199+
"Should we generate sib targets for the stdlib or not?"
200+
FALSE)
201+
198202
#
199203
# User-configurable Android specific options.
200204
#

stdlib/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ function(swift_create_stdlib_targets name variant define_all_alias)
102102
endfunction()
103103

104104
swift_create_stdlib_targets("swift-stdlib" "" TRUE)
105-
swift_create_stdlib_targets("swift-stdlib" "sib" TRUE)
106-
swift_create_stdlib_targets("swift-stdlib" "sibopt" TRUE)
107-
swift_create_stdlib_targets("swift-stdlib" "sibgen" TRUE)
105+
if(SWIFT_STDLIB_ENABLE_SIB_TARGETS)
106+
swift_create_stdlib_targets("swift-stdlib" "sib" TRUE)
107+
swift_create_stdlib_targets("swift-stdlib" "sibopt" TRUE)
108+
swift_create_stdlib_targets("swift-stdlib" "sibgen" TRUE)
109+
endif()
108110
swift_create_stdlib_targets("swift-test-stdlib" "" FALSE)
109111

110112
foreach(sdk ${SWIFT_SDKS})

0 commit comments

Comments
 (0)