Skip to content

Commit b708ed5

Browse files
committed
Fix broken implicit import conditional rename.
In #37686 `SWIFT_IMPLICIT_CONCURRENCY_IMPORT` was introduced alongside the existing `SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY`, but the `#cmakedefine` for this preprocessor symbol was renamed to the former instead of a new `#cmakedefine` being introduced. This means the `#ifdef` conditional referred in this commit was broken. Instead of just introducing the old symbol back again, let's rename it as it probably was intended here. However, the semantics of this symbol is slightly different: this now requires prospective builders to explicitly turn this off on platforms where Dispatch is unavailable. To address this, the docs are updated to match. Caveat: I have not ran the procedure in the doc recently, but this hopefully should suffice to guide the reader until I get around to doing so.
1 parent 509c498 commit b708ed5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/OpenBSD.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ $ ./utils/build-script \
8282
-DSWIFT_BUILD_SOURCEKIT=OFF,\
8383
-DSWIFT_BUILD_SYNTAXPARSERLIB=OFF,\
8484
-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF,\
85+
-DSWIFT_IMPLICIT_CONCURRENCY_IMPORT=OFF,\
8586
-DSWIFT_USE_LINKER=lld,\
8687
-DCMAKE_INSTALL_DIR=/usr/local"
8788
```

lib/Frontend/Frontend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ static bool shouldImportConcurrencyByDefault(const llvm::Triple &target) {
767767
return true;
768768
if (target.isOSLinux())
769769
return true;
770-
#if SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
770+
#if SWIFT_IMPLICIT_CONCURRENCY_IMPORT
771771
if (target.isOSOpenBSD())
772772
return true;
773773
#endif

0 commit comments

Comments
 (0)