Skip to content

Commit d7bdd8b

Browse files
committed
---
yaml --- r: 349331 b: refs/heads/master-next c: fb20b50 h: refs/heads/master i: 349329: 4675f98 349327: c4c73f6
1 parent 6edcd27 commit d7bdd8b

File tree

1,574 files changed

+142937
-61854
lines changed

Some content is hidden

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

1,574 files changed

+142937
-61854
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 768b4f17347c6508d956bcab8033dcdb306255d3
3+
refs/heads/master-next: fb20b503ba3cecaf56842c7a29c320fa4c6f791c
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CHANGELOG.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,24 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29-
* [SR-8974][]:
29+
* [SR-4206][]:
3030

31-
Duplicate tuple element labels are no longer allowed, because it leads
32-
to incorrect behavior. For example:
31+
A method override is no longer allowed to have a generic signature with
32+
requirements not imposed by the base method. For example:
3333

3434
```
35-
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
36-
37-
enum Foo { case bar(x: Int, x: Int) }
38-
let f: Foo = .bar(x: 0, x: 1)
35+
protocol P {}
36+
37+
class Base {
38+
func foo<T>(arg: T) {}
39+
}
40+
41+
class Derived: Base {
42+
override func foo<T: P>(arg: T) {}
43+
}
3944
```
4045

41-
will now be diagnosed as an error.
42-
43-
Note: You can still use duplicate labels when declaring functions and
44-
subscripts, as long as the internal labels are different. For example:
45-
46-
```
47-
func foo(bar x: Int, bar y: Int) {}
48-
subscript(a x: Int, a y: Int) -> Int {}
49-
```
46+
will now be diagnosed as an error.
5047

5148
* [SR-6118][]:
5249

@@ -68,6 +65,28 @@ Swift Next
6865
Swift 5.1
6966
---------
7067

68+
* [SR-8974][]:
69+
70+
Duplicate tuple element labels are no longer allowed, because it leads
71+
to incorrect behavior. For example:
72+
73+
```
74+
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
75+
76+
enum Foo { case bar(x: Int, x: Int) }
77+
let f: Foo = .bar(x: 0, x: 1)
78+
```
79+
80+
will now be diagnosed as an error.
81+
82+
Note: You can still use duplicate argument labels when declaring functions and
83+
subscripts, as long as the internal parameter names are different. For example:
84+
85+
```
86+
func foo(bar x: Int, bar y: Int) {}
87+
subscript(a x: Int, a y: Int) -> Int {}
88+
```
89+
7190
* [SE-0244][]:
7291

7392
Functions can now hide their concrete return type by declaring what protocols
@@ -7708,6 +7727,7 @@ Swift 1.0
77087727
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>
77097728
[SR-2672]: <https://bugs.swift.org/browse/SR-2672>
77107729
[SR-2688]: <https://bugs.swift.org/browse/SR-2688>
7730+
[SR-4206]: <https://bugs.swift.org/browse/SR-4206>
77117731
[SR-4248]: <https://bugs.swift.org/browse/SR-4248>
77127732
[SR-5581]: <https://bugs.swift.org/browse/SR-5581>
77137733
[SR-5719]: <https://bugs.swift.org/browse/SR-5719>

branches/master-next/CMakeLists.txt

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ option(SWIFT_BUILD_STATIC_SDK_OVERLAY
6161
"Build static variants of the Swift SDK overlay"
6262
FALSE)
6363

64+
option(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT
65+
"If not building stdlib, controls whether to build 'stdlib/toolchain' content"
66+
TRUE)
67+
6468
# In many cases, the CMake build system needs to determine whether to include
6569
# a directory, or perform other actions, based on whether the stdlib or SDK is
6670
# being built at all -- statically or dynamically. Please note that these
@@ -495,6 +499,18 @@ include(CMakePushCheckState)
495499

496500
print_versions()
497501

502+
include(SwiftSharedCMakeConfig)
503+
504+
# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
505+
# functionality.
506+
# Support building Swift as a standalone project, using LLVM as an
507+
# external library.
508+
if(SWIFT_BUILT_STANDALONE)
509+
swift_common_standalone_build_config(SWIFT)
510+
else()
511+
swift_common_unified_build_config(SWIFT)
512+
endif()
513+
498514
include(SwiftComponents)
499515
include(SwiftHandleGybSources)
500516
include(SwiftSetIfArchBitness)
@@ -523,16 +539,6 @@ if(NOT CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
523539
OUTPUT_STRIP_TRAILING_WHITESPACE)
524540
endif()
525541

526-
include(SwiftSharedCMakeConfig)
527-
528-
# Support building Swift as a standalone project, using LLVM as an
529-
# external library.
530-
if(SWIFT_BUILT_STANDALONE)
531-
swift_common_standalone_build_config(SWIFT)
532-
else()
533-
swift_common_unified_build_config(SWIFT)
534-
endif()
535-
536542
get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
537543
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
538544
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
@@ -599,7 +605,13 @@ if(SWIFT_HOST_VARIANT_SDK)
599605
set(SWIFT_HOST_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
600606
else()
601607
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
602-
set(SWIFT_HOST_VARIANT_SDK_default "LINUX")
608+
# CMake on an Android host sets this to Linux, so check for the ANDROID_DATA
609+
# environment variable to see if we're building on Android.
610+
if(NOT "$ENV{ANDROID_DATA}" STREQUAL "")
611+
set(SWIFT_HOST_VARIANT_SDK_default "ANDROID")
612+
else()
613+
set(SWIFT_HOST_VARIANT_SDK_default "LINUX")
614+
endif()
603615
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
604616
set(SWIFT_HOST_VARIANT_SDK_default "FREEBSD")
605617
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
@@ -609,6 +621,7 @@ else()
609621
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Haiku")
610622
set(SWIFT_HOST_VARIANT_SDK_default "HAIKU")
611623
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
624+
# CMAKE_SYSTEM_NAME might be set this way when cross-compiling to Android.
612625
set(SWIFT_HOST_VARIANT_SDK_default "ANDROID")
613626
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
614627
set(SWIFT_HOST_VARIANT_SDK_default "OSX")
@@ -621,9 +634,9 @@ endif()
621634
if(SWIFT_HOST_VARIANT_ARCH)
622635
set(SWIFT_HOST_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
623636
else()
624-
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
637+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
625638
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
626-
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
639+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
627640
set(SWIFT_HOST_VARIANT_ARCH_default "aarch64")
628641
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
629642
set(SWIFT_HOST_VARIANT_ARCH_default "powerpc64")
@@ -636,8 +649,6 @@ else()
636649
set(SWIFT_HOST_VARIANT_ARCH_default "armv6")
637650
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "armv7l|armv7-a")
638651
set(SWIFT_HOST_VARIANT_ARCH_default "armv7")
639-
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
640-
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
641652
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")
642653
set(SWIFT_HOST_VARIANT_ARCH_default "itanium")
643654
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|i686)")
@@ -675,7 +686,7 @@ endif()
675686

676687
# FIXME: the parameters we specify in SWIFT_SDKS are lacking architecture specifics,
677688
# so we need to hard-code it. For example, the SDK for Android is just 'ANDROID',
678-
# which we assume below to be armv7.
689+
# and we have to specify SWIFT_SDK_ANDROID_ARCHITECTURES separately.
679690
# The iOS SDKs all have their architectures hardcoded because they are just specified by name (e.g. 'IOS' or 'WATCHOS').
680691
# We can't cross-compile the standard library for another linux architecture,
681692
# because the SDK list would just be 'LINUX' and we couldn't disambiguate it from the host.
@@ -737,9 +748,16 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "HAIKU")
737748
elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "ANDROID")
738749

739750
set(SWIFT_HOST_VARIANT "android" CACHE STRING
740-
"Deployment OS for Swift host tools (the compiler) [android].")
751+
"Deployment OS for Swift host tools (the compiler) [android]")
752+
753+
set(SWIFT_ANDROID_NATIVE_SYSROOT "/data/data/com.termux/files" CACHE STRING
754+
"Path to Android sysroot, default initialized to the Termux app's layout")
755+
756+
if("${SWIFT_SDK_ANDROID_ARCHITECTURES}" STREQUAL "")
757+
set(SWIFT_SDK_ANDROID_ARCHITECTURES ${SWIFT_HOST_VARIANT_ARCH})
758+
endif()
741759

742-
configure_sdk_unix("Android" "${SWIFT_HOST_VARIANT_ARCH}")
760+
configure_sdk_unix("Android" "${SWIFT_SDK_ANDROID_ARCHITECTURES}")
743761
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
744762
set(SWIFT_PRIMARY_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
745763

@@ -1035,6 +1053,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
10351053
else()
10361054
set(SOURCEKIT_RUNTIME_DIR lib)
10371055
endif()
1056+
add_dependencies(sourcekit-inproc BlocksRuntime dispatch)
10381057
swift_install_in_component(FILES
10391058
$<TARGET_FILE:dispatch>
10401059
$<TARGET_FILE:BlocksRuntime>
@@ -1067,8 +1086,7 @@ endif()
10671086
#
10681087
# We must include stdlib/ before tools/ because stdlib/CMakeLists.txt
10691088
# declares the swift-stdlib-* set of targets. These targets will then
1070-
# implicitly depend on any targets declared with IS_STDLIB or
1071-
# TARGET_LIBRARY.
1089+
# implicitly depend on any targets declared with IS_STDLIB.
10721090
#
10731091
# One such library that declares IS_STDLIB is SwiftSyntax, living in
10741092
# tools/SwiftSyntax. If we include stdlib/ after tools/,
@@ -1080,10 +1098,15 @@ endif()
10801098
if(SWIFT_BUILD_STDLIB)
10811099
add_subdirectory(stdlib)
10821100
else()
1101+
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
1102+
add_subdirectory(stdlib/toolchain)
1103+
endif()
1104+
10831105
# Some tools (e.g. swift-reflection-dump) rely on a host swiftReflection, so
10841106
# ensure we build that when building tools.
10851107
if(SWIFT_INCLUDE_TOOLS)
10861108
add_subdirectory(stdlib/public/Reflection)
1109+
add_subdirectory(stdlib/public/SwiftShims)
10871110
endif()
10881111
endif()
10891112

branches/master-next/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
|**[Debian 9.1 (Raspberry Pi)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/armv7_debian_stretch.json)** | ARMv7 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1)|
1818
|**[Fedora 27](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_fedora_27.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27)|
1919
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04)|
20-
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-4.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-4.1-RA-linux-ubuntu-16.04-ppc64le)|
20+
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le)|
2121
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_16.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64)|
2222
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
2323
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|
@@ -42,6 +42,17 @@ modules, eliminating the need for headers and the code duplication they entail.
4242

4343
To learn more about the programming language, visit [swift.org](https://swift.org/documentation/).
4444

45+
- [Contributing to Swift](#contributing-to-swift)
46+
- [Getting Started](#getting-started)
47+
- [System Requirements](#system-requirements)
48+
- [Getting Sources for Swift and Related Projects](#getting-sources-for-swift-and-related-projects)
49+
- [Building Swift](#building-swift)
50+
- [Swift Toolchains](#swift-toolchains)
51+
- [Build Failures](#build-failures)
52+
- [Testing Swift](#testing-swift)
53+
- [Learning More](#learning-more)
54+
- [Build Dependencies](#build-dependencies)
55+
4556
## Contributing to Swift
4657

4758
Contributions to Swift are welcomed and encouraged! Please see the
@@ -76,7 +87,7 @@ Please make sure you use Python 2.x. Python 3.x is not supported currently.
7687

7788
#### macOS
7889

79-
To build for macOS, you need [Xcode 11 beta](https://developer.apple.com/xcode/downloads/).
90+
To build for macOS, you need [Xcode 11 beta 5](https://developer.apple.com/xcode/downloads/).
8091
The required version of Xcode changes frequently, and is often a beta release.
8192
Check this document or the host information on <https://ci.swift.org> for the
8293
current required version.

branches/master-next/apinotes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_custom_target("copy_apinotes" ALL
2626
COMMENT "Copying API notes to ${output_dir}"
2727
SOURCES "${sources}")
2828

29+
add_dependencies(compiler copy_apinotes)
2930
swift_install_in_component(DIRECTORY "${output_dir}"
3031
DESTINATION "lib/swift/"
3132
COMPONENT compiler)

branches/master-next/benchmark/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ set(SWIFT_BENCH_MODULES
7878
single-source/DictionaryRemove
7979
single-source/DictionarySubscriptDefault
8080
single-source/DictionarySwap
81+
single-source/Diffing
82+
single-source/DiffingMyers
8183
single-source/DropFirst
8284
single-source/DropLast
8385
single-source/DropWhile
@@ -164,6 +166,7 @@ set(SWIFT_BENCH_MODULES
164166
single-source/StringInterpolation
165167
single-source/StringMatch
166168
single-source/StringRemoveDupes
169+
single-source/StringReplaceSubrange
167170
single-source/StringTests
168171
single-source/StringWalk
169172
single-source/Substring

0 commit comments

Comments
 (0)