Skip to content

Commit 417c643

Browse files
Merge pull request #4653 from swiftwasm/katei/merge-main-2022-06-18
Merge main 2022-06-18
2 parents ca4a9f9 + 5de2df0 commit 417c643

File tree

255 files changed

+5294
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+5294
-957
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ to track the status of our builds, please refer to our [GitHub Actions page](htt
2323
# Swift Programming Language
2424

2525

26-
| | **Architecture** | **main** | **Package** |
27-
|---|:---:|:---:|:---:|
28-
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-macos)|[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
29-
| **Ubuntu 18.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|
30-
| **Ubuntu 20.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
31-
| **CentOS 7** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|[![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|
32-
| **Amazon Linux 2** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|
26+
| | **Architecture** | **Build** |
27+
|---|:---:|:---:|
28+
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
29+
| **Ubuntu 18.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|
30+
| **Ubuntu 20.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
31+
| **Ubuntu 20.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
32+
| **Ubuntu 22.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04)|
33+
| **Ubuntu 22.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64)|
34+
| **CentOS 7** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|
35+
| **Amazon Linux 2** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|
36+
| **Amazon Linux 2** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64)|
3337

3438
**Swift Community-Hosted CI Platforms**
3539

SwiftCompilerSources/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ function(add_swift_compiler_modules_library name)
7575

7676
set(swift_compile_options
7777
"-Xfrontend" "-validate-tbd-against-ir=none"
78-
"-Xfrontend" "-enable-cxx-interop"
78+
"-Xfrontend" "-enable-experimental-cxx-interop"
7979
"-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable")
80+
if (NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
81+
list(APPEND swift_compile_options "-Xfrontend" "-disable-implicit-string-processing-module-import")
82+
endif()
8083

8184
if(CMAKE_BUILD_TYPE STREQUAL Debug)
8285
list(APPEND swift_compile_options "-g")

SwiftCompilerSources/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private extension Target {
1717
static let defaultSwiftSettings: [SwiftSetting] = [
1818
.unsafeFlags([
1919
"-Xfrontend", "-validate-tbd-against-ir=none",
20-
"-Xfrontend", "-enable-cxx-interop",
20+
"-Xfrontend", "-enable-experimental-cxx-interop",
2121
// Bridging modules and headers
2222
"-Xcc", "-I", "-Xcc", "../include",
2323
"-cross-module-optimization"

SwiftCompilerSources/Sources/SIL/BasicBlock.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ final public class BasicBlock : ListNode, CustomStringConvertible, HasShortDescr
2525
public var function: Function { SILBasicBlock_getFunction(bridged).function }
2626

2727
public var description: String {
28-
String(_cxxString: SILBasicBlock_debugDescription(bridged))
28+
let stdString = SILBasicBlock_debugDescription(bridged)
29+
return String(_cxxString: stdString)
2930
}
3031
public var shortDescription: String { name }
3132

SwiftCompilerSources/Sources/SIL/Function.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ final public class Function : CustomStringConvertible, HasShortDescription {
2121
}
2222

2323
final public var description: String {
24-
String(_cxxString: SILFunction_debugDescription(bridged))
24+
let stdString = SILFunction_debugDescription(bridged)
25+
return String(_cxxString: stdString)
2526
}
2627

2728
public var shortDescription: String { name.string }

SwiftCompilerSources/Sources/SIL/GlobalVariable.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ final public class GlobalVariable : CustomStringConvertible, HasShortDescription
1919
}
2020

2121
public var description: String {
22-
String(_cxxString: SILGlobalVariable_debugDescription(bridged))
22+
let stdString = SILGlobalVariable_debugDescription(bridged)
23+
return String(_cxxString: stdString)
2324
}
2425

2526
public var shortDescription: String { name.string }

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public class Instruction : ListNode, CustomStringConvertible, Hashable {
3838
final public var function: Function { block.function }
3939

4040
final public var description: String {
41-
String(_cxxString: SILNode_debugDescription(bridgedNode))
41+
let stdString = SILNode_debugDescription(bridgedNode)
42+
return String(_cxxString: stdString)
4243
}
4344

4445
final public var operands: OperandArray {
@@ -142,7 +143,8 @@ public class SingleValueInstruction : Instruction, Value {
142143

143144
public final class MultipleValueInstructionResult : Value {
144145
final public var description: String {
145-
String(_cxxString: SILNode_debugDescription(bridgedNode))
146+
let stdString = SILNode_debugDescription(bridgedNode)
147+
return String(_cxxString: stdString)
146148
}
147149

148150
public var instruction: Instruction {

SwiftCompilerSources/Sources/SIL/Value.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public enum Ownership {
8181

8282
extension Value {
8383
public var description: String {
84-
String(_cxxString: SILNode_debugDescription(bridgedNode))
84+
let stdString = SILNode_debugDescription(bridgedNode)
85+
return String(_cxxString: stdString)
8586
}
8687

8788
public var uses: UseList {

docs/ABI/Mangling.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ Entities
349349
entity-spec ::= 'fE' // ivar destroyer; untyped
350350
entity-spec ::= 'fe' // ivar initializer; untyped
351351
entity-spec ::= 'Tv' NATURAL // outlined global variable (from context function)
352+
entity-spec ::= 'Tv' NATURAL 'r' // outlined global read-only object
352353
entity-spec ::= 'Te' bridge-spec // outlined objective c method call
353354

354355
entity-spec ::= decl-name label-list function-signature generic-signature? 'F' // function

docs/HowToGuides/GettingStarted.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ In project settings, locate `Build, Execution, Deployment > CMake`. You will nee
376376
- `-D SWIFT_PATH_TO_CMARK_BUILD=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/cmark-macosx-arm64 -D LLVM_DIR=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-arm64/lib/cmake/llvm -D Clang_DIR=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-arm64/lib/cmake/clang -D CMAKE_BUILD_TYPE=RelWithDebInfoAssert -G Ninja -S .`
377377
- replace the `SOME_PATH` to the path where your `swift-project` directory is
378378
- the CMAKE_BUILD_TYPE should match the build configuration name, so if you named this profile `RelWithDebInfo` the CMAKE_BUILD_TYPE should also be `RelWithDebInfo`
379+
- **Note**: If you're using an intel machine to build swift, you'll need to replace the architecture in the options. (ex: `arm64` with `x86_64`)
379380
380381
With this done, CLion should be able to successfully import the project and have full autocomplete and code navigation powers.
381382

0 commit comments

Comments
 (0)