Skip to content

Commit a1d8819

Browse files
committed
Concurrency: repair the build after swiftlang#34902
libdispatch is not part of the system on Linux and Windows, and dispatch has not been used for the standard library up until this point. The current usage is limited to the Apple platforms, so rather than adding another build of dispatch, conditionally include the header instead.
1 parent 446c327 commit a1d8819

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
#include "swift/Runtime/HeapObject.h"
2121
#include "TaskPrivate.h"
2222

23+
#if defined(__APPLE__)
2324
// TODO: We shouldn't need this
2425
#include <dispatch/dispatch.h>
26+
#endif
2527

2628
using namespace swift;
2729
using FutureFragment = AsyncTask::FutureFragment;

0 commit comments

Comments
 (0)