Skip to content

Commit 1a07733

Browse files
authored
Merge pull request #37686 from DougGregor/minimal-stdlib-concurrency-fix
Separate CMake option for "build concurrency lib" and "import concurrency lib"
2 parents c8a28f4 + 4c1c8ed commit 1a07733

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,12 @@ option(SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING
414414
"Enable experimental Swift differentiable programming features"
415415
FALSE)
416416

417+
option(SWIFT_IMPLICIT_CONCURRENCY_IMPORT
418+
"Implicitly import the Swift concurrency module"
419+
TRUE)
420+
417421
option(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
418-
"Enable experimental Swift concurrency model"
422+
"Enable build of the Swift concurrency module"
419423
FALSE)
420424

421425
option(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ namespace swift {
284284

285285
/// Disable the implicit import of the _Concurrency module.
286286
bool DisableImplicitConcurrencyModuleImport =
287-
!SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY;
287+
!SWIFT_IMPLICIT_CONCURRENCY_IMPORT;
288288

289289
/// Should we check the target OSs of serialized modules to see that they're
290290
/// new enough?

include/swift/Config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#cmakedefine HAVE_PROC_PID_RUSAGE 1
1010

11-
#cmakedefine01 SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
11+
#cmakedefine01 SWIFT_IMPLICIT_CONCURRENCY_IMPORT
1212

1313
#cmakedefine01 SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED
1414

utils/build-presets.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,7 @@ swift-enable-compatibility-overrides=0
24182418
swift-runtime-macho-no-dyld=1
24192419
swift-stdlib-single-threaded-runtime=1
24202420
swift-stdlib-os-versioning=0
2421-
extra-cmake-options=-DSWIFT_ENABLE_DISPATCH:BOOL=FALSE
2421+
extra-cmake-options=-DSWIFT_ENABLE_DISPATCH:BOOL=FALSE -DSWIFT_IMPLICIT_CONCURRENCY_IMPORT:BOOL=FALSE
24222422

24232423
[preset: stdlib_S_standalone_minimal_macho_x86_64,build]
24242424
mixin-preset=

0 commit comments

Comments
 (0)