Skip to content

Commit a08d642

Browse files
committed
Introduce fake symbols that were present with the old concurrency ABI.
The concurrency ABI has shifted considerably, including renaming many symbols. However, there remain some existing libraries that link against these symbols and aren't necessarily immediately rebuilt. Add some "fake" symbols for the ones that we need, so those existing libraries can link against a new `_Concurrency` library... even though the resulting binary would not be able to execute. This is a grotesque hack and a stop-gap. Speculative fix for rdar://79298287.
1 parent 45699ce commit a08d642

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
5757
AsyncThrowingMapSequence.swift
5858
AsyncThrowingPrefixWhileSequence.swift
5959
GlobalActor.swift
60+
LinkCompatibilityShims.cpp
6061
MainActor.swift
6162
PartialAsyncTask.swift
6263
SourceCompatibilityShims.swift
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
// This file provides link compatibility shims to work through some ABI
13+
// changes.
14+
//===----------------------------------------------------------------------===//
15+
#include "../public/SwiftShims/Visibility.h"
16+
17+
#define OLD_SYMBOL(NAME) \
18+
SWIFT_EXPORT_FROM(swift_Concurrency) extern "C" void const * const NAME = nullptr;
19+
20+
OLD_SYMBOL($ss4TaskV6HandleVMn)
21+
OLD_SYMBOL($ss4TaskV8PriorityOMa)
22+
OLD_SYMBOL($ss4TaskV8PriorityO11unspecifiedyA2DmFWC)
23+
OLD_SYMBOL($ss6detach8priority9operations4TaskV6HandleVy_xs5NeverOGAE8PriorityO_xyYaYbcntlF)
24+
OLD_SYMBOL($ss6detach8priority9operations4TaskV6HandleVy_xs5NeverOGAE8PriorityO_xyYaYbcntlFfA_)
25+
OLD_SYMBOL($ss18UnsafeContinuationVMn)
26+

0 commit comments

Comments
 (0)