Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
5c67216
[Changelog] fix formatting of recent items
ktoso Apr 6, 2022
43d5ddd
[NFC][CodeCompletion] Prepend 'should' to 'addItemWithoutDefaultArgs'
rintaro Apr 5, 2022
db097aa
[CodeCompletion] Don't mark some undesirable imported default values
rintaro Apr 5, 2022
979035a
[CodeCompletion] Ensure synthesized members are available before lookup
rintaro Mar 8, 2022
e559de8
Add executable tests for the edge case of unbound reference to option…
AnthonyLatsis Apr 14, 2022
5db44c3
CHANGELOG: Add entry for #41849 and #42332
AnthonyLatsis Apr 14, 2022
5deab08
CHANGELOG: Add missing language mode for code block
AnthonyLatsis Apr 21, 2022
490b4ec
[test] avoid using array conversion for String-from-C-string
glessard Mar 25, 2022
cb04de1
[stdlib] harmonize parameter labels with StringProtocol
glessard Mar 29, 2022
f641ca8
[stdlib] remove incorrect uses of pointer conversion
glessard Mar 26, 2022
2ede9a7
[stdlib] overload for arrays passed to `String.init(cString:)`
glessard Mar 24, 2022
d809640
[stdlib] overload for arrays passed to String.init?(validatingUTF8:)
glessard Mar 25, 2022
63ba39f
[stdlib] overload for arrays passed to String(decodeCString:as:)
glessard Mar 25, 2022
1eee243
[stdlib] String overloads for String-from-C-string inits
glessard Apr 1, 2022
7d2151f
[test] add tests of String-from-C-string Array overloads
glessard Apr 4, 2022
1e5d690
[test] add tests of String-from-C-string String overloads
glessard Apr 4, 2022
0285602
[stdlib] overload String-from-C-string initializers in the case of in…
glessard Apr 4, 2022
c594482
[test] add tests of String-from-C-string inout conversion overloads
glessard Apr 4, 2022
59c1f42
[test] check deprecation warnings for undesirable overloads
glessard Apr 5, 2022
d83d060
[stdlib] improve the new deprecation messages
glessard Apr 5, 2022
c3256a3
[test] work around a linux testing issue
glessard Apr 6, 2022
044f436
[test] just don’t check for the crash message
glessard Apr 6, 2022
ece2965
[test] check for availability before testing
glessard Apr 10, 2022
b9dfe0c
Runtime: correct invalid C++ workaround
compnerd Apr 13, 2022
d1eaa16
runtime: use explicit name for placement new
compnerd Apr 14, 2022
4ba9bcd
Concurrency: include missing header
compnerd Apr 14, 2022
d6ab6c6
runtime: blanket application of namespacing and inclusion of `new`
compnerd Apr 14, 2022
ff69aae
Ensure AtomicWaitQueue allocates its inner queues in an aligned fashi…
grynspan Apr 14, 2022
a06bddb
Make sure we don't provide duplicate synthesized conformance table en…
DougGregor Apr 22, 2022
bc78aa9
[Clang importer] Consider attributes on the typedef name for an anony…
DougGregor Apr 23, 2022
72777ae
Introduce missing Sendable conformances for existential conversions
DougGregor Apr 23, 2022
fc8cf54
Fix testcase now that we get warnings instead of errors
DougGregor Apr 23, 2022
eb60156
Trivial fix for an LICM assertion in projectLoadValue
atrick Apr 22, 2022
1ff7fd9
Fix test for the branch
DougGregor Apr 23, 2022
cec31b5
[SwiftCompiler/Regex] Use bridged DiagnosticEngine for error reporting
rintaro Apr 7, 2022
2ab7d83
[SourceKit] Remove an unnecessary link and an include from SourceKitS…
rintaro Apr 23, 2022
57463c9
Resolve a structural calculation error with clocks that prevented sle…
phausler Apr 25, 2022
3a920cd
Merge pull request #42383 from ktoso/pick-changelog-formatting
DougGregor Apr 25, 2022
f83af65
Merge pull request #42396 from rintaro/5.7-ide-completion-rdar89051832
DougGregor Apr 25, 2022
31967c6
Merge pull request #42397 from rintaro/5.7-ide-completion-rdar89773376
DougGregor Apr 25, 2022
65ff7ae
Revert "[SR-15703] Fix missing hop in error path of foreign async thr…
kavon Apr 25, 2022
8b5aaae
Revert "Simplify lifetime extension for async ObjC calls."
kavon Apr 25, 2022
b26108c
Merge pull request #42361 from AnthonyLatsis/5.7-changelog-dynamic-lo…
AnthonyLatsis Apr 25, 2022
74537cf
Merge pull request #42608 from DougGregor/existential-sendable-warnin…
DougGregor Apr 25, 2022
c861d12
Merge pull request #42603 from DougGregor/clang-importer-anonymous-ta…
DougGregor Apr 25, 2022
f3c2ad0
Merge pull request #42598 from DougGregor/no-synthesized-conformance-…
DougGregor Apr 25, 2022
56b1c7d
Merge pull request #58398 from kavon/5.7-fix-cont-jump-to-null
kavon Apr 26, 2022
6d8c274
Disable failing distributed actor tests. Example failure: https://ci.…
artemcm Apr 26, 2022
eb493f8
Merge pull request #58424 from artemcm/57DisableFailingDistributedActors
artemcm Apr 26, 2022
83fe0ee
Merge pull request #58390 from rintaro/5.7-regex_diagnostics
rintaro Apr 26, 2022
ecf2db3
Downgrade missing @Sendable to a warning in Swift 5.x mode.
DougGregor Apr 26, 2022
aa54188
Merge pull request #42613 from atrick/5.7-fix-licm-projectload
atrick Apr 27, 2022
5b793f3
Merge pull request #58388 from al45tair/eng/PR-91831405
al45tair Apr 27, 2022
3e8d153
Merge pull request #42304 from glessard/rdar90336023-5.7
glessard Apr 27, 2022
f04ed60
[stdlib] remove most uses of _asCChar and _asUInt8
glessard Apr 6, 2022
ff6dbdb
[stdlib] less `assumingMemoryBound`, rebind instead
glessard Apr 6, 2022
dba5320
Add missing parameter.
amartini51 Feb 16, 2022
d93573c
[stdlib] add unaligned loads to UnsafeRawPointer
glessard Feb 10, 2022
5f65198
[stdlib] update UnsafeMutableRawPointer.storeBytes
glessard Feb 10, 2022
04cd339
[stdlib] add unaligned loads to Unsafe{Mutable}RawBufferPointer
glessard Feb 10, 2022
86089dc
[stdlib] update UnsafeMutableRawBufferPointer.storeBytes
glessard Feb 10, 2022
819ef4f
[stdlib] state clearly the precondition of loadUnaligned
glessard Mar 31, 2022
7019dcb
[test] fix false results from the ABI checker
glessard Feb 10, 2022
e923ab5
[gardening] remove unnecessary warnings from test
glessard Apr 15, 2022
ea7f5a8
[test] new stdlib load/store behaviours
glessard Apr 14, 2022
4058424
[test] Test new unaligned store behaviour
glessard Apr 18, 2022
a37248a
[stdlib] incorporate proposal number in silgen name
glessard Apr 18, 2022
f160e2b
[test] make back-deployment testing possible
glessard Apr 18, 2022
7bd26e4
[ChangeLog] add SE-0349
glessard Apr 27, 2022
77a9433
Revert "Revert "Simplify lifetime extension for async ObjC calls.""
kavon Apr 27, 2022
836e90c
Revert "Revert "[SR-15703] Fix missing hop in error path of foreign a…
kavon Apr 27, 2022
812ef34
[SILVerifier] a hop_to_executor may suspend the task.
kavon Apr 26, 2022
4c32315
Merge pull request #58462 from glessard/rdar91343475-5.7
glessard Apr 27, 2022
85e2a7b
Merge pull request #42401 from glessard/se-unaligned-5.7
glessard Apr 28, 2022
a87aad5
[ChangeLog] synchronize with main
glessard Apr 27, 2022
c1fcf45
Merge pull request #42556 from glessard/changelog-updates
glessard Apr 28, 2022
27ea039
[IRGen] Restore the old code path for emitting existential type metadata
hborla Apr 28, 2022
2ee820c
[ConstraintSystem] Extend availability check to cover unavailable ext…
xedin Apr 27, 2022
891a1fc
[CSStep] Abort any binding step when constraint system is 'too complex'
xedin Apr 23, 2022
4fb6204
[ConstraintSystem] `getExpressionTooComplex` should check the flag be…
xedin Apr 23, 2022
8465a23
[ConstraintSystem] NFC: Drop `Expression` from `isTooComplex` check
xedin Apr 25, 2022
0753024
[ConstraintSystem] Save "too complex" source range if known
xedin Apr 25, 2022
736863b
[ConstraintSystem] Use affected range (if any) to diagnose 'too compl…
xedin Apr 25, 2022
7796f53
[TypeChecker] NFC: Add a "slow" perf test-case for rdar://91310777
xedin Apr 25, 2022
1858878
Revert "Add `-async-main` flag to favor asynchronous main"
etcwilde Apr 7, 2022
edda7a9
Ignore async/sync mismatch on main
etcwilde Apr 20, 2022
1b419c9
Use disjunction to resolve main function
etcwilde Apr 26, 2022
d203856
Allow checking for invalid @main
etcwilde Apr 26, 2022
7acbb87
Update tests
etcwilde Apr 26, 2022
17b4b5d
Update disjunction constraints
etcwilde Apr 27, 2022
862dfa9
[Test] Disable objc_old_swift.swift on ARM64e.
mikeash Apr 28, 2022
2dc4d34
Merge pull request #58476 from kavon/5.7-undo-fix-cont-jump-to-null
kavon Apr 28, 2022
ec12de2
Merge pull request #58488 from xedin/too-complex-improvements-.5.7
xedin Apr 28, 2022
7fd778c
Merge pull request #58487 from xedin/rdar-92364955-5.7
xedin Apr 28, 2022
227b027
Merge pull request #58489 from etcwilde/ewilde/disjunction-main-resol…
etcwilde Apr 28, 2022
e49d269
Sema: When diagnosing required explicit availability, skip members of…
tshortli Apr 26, 2022
c2d5796
Merge pull request #58485 from hborla/5.7-existential-type-metadata-fix
hborla Apr 29, 2022
eaf561d
Merge pull request #58496 from mikeash/disable-objc-old-swift-arm64e-5.7
mikeash Apr 29, 2022
52109f4
Merge pull request #58506 from tshortli/require-explicit-availability…
tshortli Apr 29, 2022
6fff1c4
Merge pull request #58444 from al45tair/eng/PR-91831405-5.7
al45tair Apr 29, 2022
278edd0
[RemoteMirror] Add bounds checking to BitMask operations.
mikeash Apr 28, 2022
073f733
Merge pull request #42580 from compnerd/5.7-aligned
compnerd Apr 29, 2022
e101e9f
Merge pull request #58432 from DougGregor/downgrade-sendable-function…
DougGregor Apr 29, 2022
9d39b4b
Merge pull request #58525 from mikeash/bitmask-range-checks-5.7
mikeash Apr 29, 2022
8b1c098
Merge remote-tracking branch 'origin/release/5.7' into katei/merge-5.…
kateinoigakukun Apr 30, 2022
38222d5
[Wasm] Disable crash tests in test/stdlib/UnsafeRawPointer.swift
kateinoigakukun Apr 20, 2022
72875f0
[Wasm] Disable crash tests in test/stdlib/StringAPICString.swift
kateinoigakukun Apr 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 146 additions & 64 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,88 @@ _**Note:** This is in reverse chronological order, so newer entries are added to

## Swift 5.7

* References to `optional` methods on a protocol metatype, as well as references to dynamically looked up methods on the `AnyObject` metatype are now supported. These references always have the type of a function that accepts a single argument and returns an optional value of function type:

```swift
class Object {
@objc func getTag() -> Int
}

@objc protocol P {
@objc optional func didUpdateObject(withTag tag: Int)
}

let getTag: (AnyObject) -> (() -> Int)? = AnyObject.getTag

let didUpdateObject: (any P) -> ((Int) -> Void)? = P.didUpdateObject
```

* [SE-0349][]:

Loading data from raw memory represented by `UnsafeRawPointer`,
`UnsafeRawBufferPointer` and their mutable counterparts now supports unaligned
accesses. This previously required a workaround involving an intermediate
copy:

```swift
let result = unalignedData.withUnsafeBytes { buffer -> UInt32 in
var storage = UInt32.zero
withUnsafeMutableBytes(of: &storage) {
$0.copyBytes(from: buffer.prefix(MemoryLayout<UInt32>.size))
}
return storage
}
```
Now:
```swift
let result = unalignedData.withUnsafeBytes { $0.loadUnaligned(as: UInt32.self) }
```
Additionally, the counterpart `storeBytes(of:toByteOffset:as:)` had its
alignment restriction lifted, so that storing to arbitrary offsets of raw
memory can now succeed.

* [SE-0334][]:

- `UnsafeRawPointer` and `UnsafeMutableRawPointer` have new functionality for
pointer arithmetic, adding functions to obtain a pointer advanced to the next
or previous alignment boundary:

```swift
extension UnsafeRawPointer {
public func alignedUp<T>(for: T.type) -> UnsafeRawPointer
public func alignedDown<T>(for: T.type) -> UnsafeRawPointer
public func alignedUp(toMultipleOf alignment: Int) -> UnsafeRawPointer
public func alignedDown(toMultipleOf alignment: Int) -> UnsafeRawPointer
}
```
- It is now possible to use a pointer to `struct` to obtain a pointer to one
of its stored properties:

```swift
withUnsafeMutablePointer(to: &myStruct) {
let interiorPointer = $0.pointer(to: \.myProperty)!
return myCFunction(interiorPointer)
}
```
- Comparisons between pointers have been simplified by being more permissive.
Since pointers are representations of memory locations within a single pool of
underlying memory, Swift now allows comparing pointers without requiring type
conversions with the `==`, `!=`, `<`,`<=`,`>`, and `>=` operators.

* [SE-0333][]:

It is now possible to use the `withMemoryRebound<T>()` method on raw memory,
that is `UnsafeRawPointer` , `UnsafeRawBufferPointer` and their mutable
counterparts. Additionally, we clarified the semantics of
`withMemoryRebound<T>()` when used on typed memory (`UnsafePointer<Pointee>`,
`UnsafeBufferPointer<Pointee>` and their mutable counterparts). Whereas
`Pointee` and `T` were previously required to have the same stride, you can
now rebind in cases where `Pointee` is an aggregate of `T` or vice-versa. For
example, given an `UnsafeMutableBufferPointer<CGPoint>`, you can now use
`withMemoryRebound` to operate temporarily on a
`UnsafeMutableBufferPointer<CGFloat>`, because `CGPoint` is an aggregate of
`CGFloat`.

* [SE-0352][]:

It's now possible to call a generic function with a value of protocol type
Expand Down Expand Up @@ -32,7 +114,7 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
It's now possible to use a default value expression with a generic parameter type
to default the argument and its type:

```
```swift
func compute<C: Collection>(_ values: C = [0, 1, 2]) {
...
}
Expand Down Expand Up @@ -107,54 +189,54 @@ _**Note:** This is in reverse chronological order, so newer entries are added to

* [SE-0343][]:

Top-level scripts support asynchronous calls.
Top-level scripts support asynchronous calls.

Using an `await` by calling an asynchronous function or accessing an isolated
variable transitions the top-level to an asynchronous context. As an
asynchronous context, top-level variables are `@MainActor`-isolated and the
top-level is run on the `@MainActor`.
Using an `await` by calling an asynchronous function or accessing an isolated
variable transitions the top-level to an asynchronous context. As an
asynchronous context, top-level variables are `@MainActor`-isolated and the
top-level is run on the `@MainActor`.

Note that the transition affects function overload resolution and starts an
implicit run loop to drive the concurrency machinery.
Note that the transition affects function overload resolution and starts an
implicit run loop to drive the concurrency machinery.

Unmodified scripts are not affected by this change unless `-warn-concurrency` is
passed to the compiler invocation. With `-warn-concurrency`, variables in the
top-level are isolated to the main actor and the top-level context is isolated
to the main actor, but is not an asynchronous context.
Unmodified scripts are not affected by this change unless `-warn-concurrency` is
passed to the compiler invocation. With `-warn-concurrency`, variables in the
top-level are isolated to the main actor and the top-level context is isolated
to the main actor, but is not an asynchronous context.

* [SE-0336][]:

It is now possible to declare `distributed actor` and `distributed func`s inside of them.

Distributed actors provide stronger isolation guarantees than "local" actors, and enable additional checks to be made on return types and parameters of distributed methods, e.g. checking if they conform to `Codable`. Distributed methods can be called on "remote" references of distributed actors, turning those invocations into remote procedure calls, by means of pluggable and user extensible distributed actor system implementations.

Swift does not provide any specific distributed actor system by itself, however, packages in the ecosystem fulfil the role of providing those implementations.
It is now possible to declare `distributed actor` and `distributed func`s inside of them.

```swift
distributed actor Greeter {
var greetingsSent = 0
Distributed actors provide stronger isolation guarantees than "local" actors, and enable additional checks to be made on return types and parameters of distributed methods, e.g. checking if they conform to `Codable`. Distributed methods can be called on "remote" references of distributed actors, turning those invocations into remote procedure calls, by means of pluggable and user extensible distributed actor system implementations.

distributed func greet(name: String) -> String {
greetingsSent += 1
return "Hello, \(name)!"
Swift does not provide any specific distributed actor system by itself, however, packages in the ecosystem fulfill the role of providing those implementations.

```swift
distributed actor Greeter {
var greetingsSent = 0

distributed func greet(name: String) -> String {
greetingsSent += 1
return "Hello, \(name)!"
}
}
}

func talkTo(greeter: Greeter) async throws {
// isolation of distributed actors is stronger, it is impossible to refer to
// any stored properties of distributed actors from outside of them:
greeter.greetingsSent // distributed actor-isolated property 'name' can not be accessed from a non-isolated context

// remote calls are implicitly throwing and async,
// to account for the potential networking involved:
let greeting = try await greeter.greet(name: "Alice")
print(greeting) // Hello, Alice!
}
```
func talkTo(greeter: Greeter) async throws {
// isolation of distributed actors is stronger, it is impossible to refer to
// any stored properties of distributed actors from outside of them:
greeter.greetingsSent // distributed actor-isolated property 'name' can not be accessed from a non-isolated context

// remote calls are implicitly throwing and async,
// to account for the potential networking involved:
let greeting = try await greeter.greet(name: "Alice")
print(greeting) // Hello, Alice!
}
```

* The compiler now emits a warning when a non-final class conforms to a protocol that imposes a same-type requirement between `Self` and an associated type. This is because such a requirement makes the conformance unsound for subclasses.

For example, Swift 5.6 would allow the following code, which at runtime would construct an instance of `C` and not `SubC` as expected:
For example, Swift 5.6 would allow the following code, which at runtime would construct an instance of `C` and not `SubC` as expected:

```swift
protocol P {
Expand Down Expand Up @@ -257,29 +339,32 @@ For example, Swift 5.6 would allow the following code, which at runtime would co
return [ 1: "One", 2: "Two" ]
}
```

Swift 5.6
---------

* [SE-0327][]:

In Swift 5 mode, a warning is now emitted if the default-value expression of an
instance-member property requires global-actor isolation. For example:
### 2022-03-14 (Xcode 13.3)

```swift
@MainActor
func partyGenerator() -> [PartyMember] { fatalError("todo") }
* [SE-0327][]:

class Party {
@MainActor var members: [PartyMember] = partyGenerator()
// ^~~~~~~~~~~~~~~~
// warning: expression requiring global actor 'MainActor' cannot
// appear in default-value expression of property 'members'
}
```
In Swift 5 mode, a warning is now emitted if the default-value expression of an
instance-member property requires global-actor isolation. For example:

Previously, the isolation granted by the type checker matched the isolation of
the property itself, but at runtime that is not guaranteed. In Swift 6,
such default-value expressions will become an error if they require isolation.
```swift
@MainActor
func partyGenerator() -> [PartyMember] { fatalError("todo") }

class Party {
@MainActor var members: [PartyMember] = partyGenerator()
// ^~~~~~~~~~~~~~~~
// warning: expression requiring global actor 'MainActor' cannot
// appear in default-value expression of property 'members'
}
```

Previously, the isolation granted by the type checker matched the isolation of
the property itself, but at runtime that is not guaranteed. In Swift 6,
such default-value expressions will become an error if they require isolation.

* Actor isolation checking now understands that `defer` bodies share the isolation of their enclosing function.

Expand Down Expand Up @@ -488,8 +573,6 @@ such default-value expressions will become an error if they require isolation.
}
```

**Add new entries to the top of this section, not here!**

Swift 5.5
---------

Expand Down Expand Up @@ -908,8 +991,6 @@ Swift 5.5
Asynchronous for loops use asynchronous sequences, defined by the protocol
`AsyncSequence` and its corresponding `AsyncIterator`.

**Add new entries to the top of this section, not here!**

Swift 5.4
---------

Expand Down Expand Up @@ -1076,8 +1157,6 @@ Swift 5.4
let _: Foo? = .bar.anotherFoo.getFoo().optionalFoo?.optionalFoo![]
```

**Add new entries to the top of this section, not here!**

Swift 5.3
---------

Expand Down Expand Up @@ -9173,20 +9252,23 @@ Swift 1.0
[SE-0316]: <https://github.com/apple/swift-evolution/blob/main/proposals/0316-global-actors.md>
[SE-0320]: <https://github.com/apple/swift-evolution/blob/main/proposals/0320-codingkeyrepresentable.md>
[SE-0322]: <https://github.com/apple/swift-evolution/blob/main/proposals/0322-temporary-buffers.md>
[SE-0324]: <https://github.com/apple/swift-evolution/blob/main/proposals/0324-c-lang-pointer-arg-conversion.md>
[SE-0323]: <https://github.com/apple/swift-evolution/blob/main/proposals/0323-async-main-semantics.md>
[SE-0324]: <https://github.com/apple/swift-evolution/blob/main/proposals/0324-c-lang-pointer-arg-conversion.md>
[SE-0326]: <https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md>
[SE-0327]: <https://github.com/apple/swift-evolution/blob/main/proposals/0327-actor-initializers.md>
[SE-0328]: <https://github.com/apple/swift-evolution/blob/main/proposals/0328-structural-opaque-result-types.md>
[SE-0331]: <https://github.com/apple/swift-evolution/blob/main/proposals/0331-remove-sendable-from-unsafepointer.md>
[SE-0337]: <https://github.com/apple/swift-evolution/blob/main/proposals/0337-support-incremental-migration-to-concurrency-checking.md>
[SE-0333]: <https://github.com/apple/swift-evolution/blob/main/proposals/0333-with-memory-rebound.md>
[SE-0334]: <https://github.com/apple/swift-evolution/blob/main/proposals/0334-pointer-usability-improvements.md>
[SE-0335]: <https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md>
[SE-0341]: <https://github.com/apple/swift-evolution/blob/main/proposals/0341-opaque-parameters.md>
[SE-0336]: <https://github.com/apple/swift-evolution/blob/main/proposals/0336-distributed-actor-isolation.md>
[SE-0343]: <https://github.com/apple/swift-evolution/blob/main/proposals/0343-top-level-concurrency.md>
[SE-0337]: <https://github.com/apple/swift-evolution/blob/main/proposals/0337-support-incremental-migration-to-concurrency-checking.md>
[SE-0340]: <https://github.com/apple/swift-evolution/blob/main/proposals/0340-swift-noasync.md>
[SE-0341]: <https://github.com/apple/swift-evolution/blob/main/proposals/0341-opaque-parameters.md>
[SE-0343]: <https://github.com/apple/swift-evolution/blob/main/proposals/0343-top-level-concurrency.md>
[SE-0345]: <https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md>
[SE-0326]: <https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md>
[SE-0347]: <https://github.com/apple/swift-evolution/blob/main/proposals/0347-type-inference-from-default-exprs.md>
[SE-0349]: <https://github.com/apple/swift-evolution/blob/main/proposals/0349-unaligned-loads-and-stores.md>
[SE-0352]: <https://github.com/apple/swift-evolution/blob/main/proposals/0352-implicit-open-existentials.md>

[SR-75]: <https://bugs.swift.org/browse/SR-75>
Expand Down
20 changes: 20 additions & 0 deletions SwiftCompilerSources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,23 @@ else()

endif()

# Configure 'SwiftCompilerModules' SwiftPM package. The 'Package.swift' will
# be created at '${build_dir}/SwiftCompilerSources/Package.swift' and can be
# built with 'swift-build'.
# Note that this SwiftPM package itself is just for development purposes, and
# is not actually used for the compiler building.
set(swiftcompiler_source_dir_name "_Sources")
configure_file(Package.swift.in
"${CMAKE_CURRENT_BINARY_DIR}/Package.swift" @ONLY)
# SwiftPM requires all sources are inside the directory of 'Package.swift'.
# Create symlinks to the actual source directories.
execute_process(COMMAND
"${CMAKE_COMMAND}" -E create_symlink
"${CMAKE_CURRENT_SOURCE_DIR}/Sources"
"${CMAKE_CURRENT_BINARY_DIR}/${swiftcompiler_source_dir_name}")
if(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER)
execute_process(COMMAND
"${CMAKE_COMMAND}" -E create_symlink
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}/Sources/_RegexParser"
"${CMAKE_CURRENT_BINARY_DIR}/_RegexParser_Sources")
endif()
51 changes: 0 additions & 51 deletions SwiftCompilerSources/Package.swift

This file was deleted.

Loading