Skip to content

Commit ecb1955

Browse files
committed
Merge branch 'master' into dynamic-callable
2 parents 2e39545 + 2f4e70b commit ecb1955

File tree

1,333 files changed

+52187
-46973
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,333 files changed

+52187
-46973
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ filename = *.py,
2323
./utils/recursive-lipo,
2424
./utils/round-trip-syntax-test,
2525
./utils/rth,
26+
./utils/run-remote,
2627
./utils/run-test,
2728
./utils/scale-test,
2829
./utils/submit-benchmark-results,

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ compile_commands.json
5353
SortedCFDatabase.def
5454
htmlcov
5555
.coverage
56+
/benchmark/scripts/Benchmark_Driverc

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ CHANGELOG
2424
Swift 5.0
2525
---------
2626

27+
* [SE-0214][]:
28+
29+
Renamed the `DictionaryLiteral` type to `KeyValuePairs`.
30+
A typealias preserves the old name for compatibility.
31+
2732
* [SR-2608][]
2833

2934
Default arguments are now printed in SourceKit-generated interfaces for Swift
@@ -7147,6 +7152,20 @@ Swift 1.0
71477152
[SE-0210]: <https://github.com/apple/swift-evolution/blob/master/proposals/0210-key-path-offset.md>
71487153
[SE-0211]: <https://github.com/apple/swift-evolution/blob/master/proposals/0211-unicode-scalar-properties.md>
71497154
[SE-0212]: <https://github.com/apple/swift-evolution/blob/master/proposals/0212-compiler-version-directive.md>
7155+
[SE-0213]: <https://github.com/apple/swift-evolution/blob/master/proposals/0213-literal-init-via-coercion.md>
7156+
[SE-0214]: <https://github.com/apple/swift-evolution/blob/master/proposals/0214-DictionaryLiteral.md>
7157+
[SE-0215]: <https://github.com/apple/swift-evolution/blob/master/proposals/0215-conform-never-to-hashable-and-equatable.md>
7158+
[SE-0216]: <https://github.com/apple/swift-evolution/blob/master/proposals/0216-dynamic-callable.md>
7159+
[SE-0217]: <https://github.com/apple/swift-evolution/blob/master/proposals/0217-bangbang.md>
7160+
[SE-0218]: <https://github.com/apple/swift-evolution/blob/master/proposals/0218-introduce-compact-map-values.md>
7161+
[SE-0219]: <https://github.com/apple/swift-evolution/blob/master/proposals/0219-package-manager-dependency-mirroring.md>
7162+
[SE-0220]: <https://github.com/apple/swift-evolution/blob/master/proposals/0220-count-where.md>
7163+
[SE-0221]: <https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md>
7164+
[SE-0222]: <https://github.com/apple/swift-evolution/blob/master/proposals/0222-lazy-compactmap-sequence.md>
7165+
[SE-0223]: <https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md>
7166+
[SE-0224]: <https://github.com/apple/swift-evolution/blob/master/proposals/0224-ifswift-lessthan-operator.md>
7167+
[SE-0225]: <https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md>
7168+
[SE-0226]: <https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md>
71507169

71517170
[SR-106]: <https://bugs.swift.org/browse/SR-106>
71527171
[SR-419]: <https://bugs.swift.org/browse/SR-419>

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,11 @@ cmake_pop_check_state()
898898

899899
check_symbol_exists(wait4 "sys/wait.h" HAVE_WAIT4)
900900

901+
check_symbol_exists(proc_pid_rusage "libproc.h" HAVE_PROC_PID_RUSAGE)
902+
if(HAVE_PROC_PID_RUSAGE)
903+
list(APPEND CMAKE_REQUIRED_LIBRARIES proc)
904+
endif()
905+
901906
if (LLVM_ENABLE_DOXYGEN)
902907
message(STATUS "Doxygen: enabled")
903908
endif()
@@ -937,11 +942,7 @@ add_subdirectory(stdlib)
937942
if(SWIFT_INCLUDE_TOOLS)
938943
add_subdirectory(include)
939944
add_subdirectory(lib)
940-
endif()
941-
942-
include(SwiftExternal)
943-
944-
if(SWIFT_INCLUDE_TOOLS)
945+
945946
# Always include this after including stdlib/!
946947
# Refer to the large comment above the add_subdirectory(stdlib) call.
947948
# https://bugs.swift.org/browse/SR-5975

CODE_OWNERS.TXT

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ D: XCTest overlay
2020
N: Erik Eckstein
2121
2222
G: eeckstein
23-
D: SILOptimizer
23+
D: SILOptimizer, Swift Benchmark Suite
2424

2525
N: Xi Ge
2626
@@ -42,11 +42,6 @@ E: [email protected]
4242
G: akyrtzi
4343
D: IDE, Index, SourceKit, swift-ide-test
4444

45-
N: Luke Larson
46-
47-
G: lplarson
48-
D: Swift Benchmark Suite
49-
5045
N: John McCall
5146
5247
G: rjmccall

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
| **Ubuntu 14.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04)|
1010
| **Ubuntu 16.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04)|
1111
| **Ubuntu 16.10** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_10/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_10)|
12+
| **Ubuntu 18.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04)|
1213

1314
**Swift Community-Hosted CI Platforms**
1415

@@ -17,10 +18,12 @@
1718
|**[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)|
1819
|**[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)|
1920
|**[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 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
2121
|**[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)|
2222
|**[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)|
2323
|**[Ubuntu 16.04 (Android)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | x86_64 |[![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)|
24+
|**[Ubuntu 16.04 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
25+
|**[macOS 10.13 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_macos_high_sierra_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow)|
26+
|**[Ubuntu 16.04 (TensorFlow with GPU)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow_gpu.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu)|
2427

2528

2629
**Welcome to Swift!**
@@ -69,7 +72,7 @@ supported host development operating systems.
6972

7073
#### macOS
7174

72-
To build for macOS, you need [Xcode 10 beta 5](https://developer.apple.com/xcode/downloads/).
75+
To build for macOS, you need [Xcode 10 beta 6](https://developer.apple.com/xcode/downloads/).
7376
The required version of Xcode changes frequently, and is often a beta release.
7477
Check this document or the host information on <https://ci.swift.org> for the
7578
current required version.
@@ -206,6 +209,49 @@ common debug flow would involve:
206209
Another option is to change the scheme to "Wait for executable to be launched",
207210
then run the build product in Terminal.
208211

212+
### Swift Toolchains
213+
214+
#### Building
215+
216+
Swift toolchains are created using the script
217+
[build-toolchain](https://github.com/apple/swift/blob/master/utils/build-toolchain). This
218+
script is used by swift.org's CI to produce snapshots and can allow for one to
219+
locally reproduce such builds for development or distribution purposes. E.x.:
220+
221+
```
222+
$ ./utils/build-toolchain $TOOLCHAIN_PREFIX
223+
```
224+
225+
where ``$TOOLCHAIN_PREFIX`` is a string that will be prepended to the swift
226+
package name in the produced tar ball. For instance, if ``$TOOLCHAIN_PREFIX``
227+
was ``macOS``, the produced archive will have the name
228+
``swift-macOS.tar.gz``.
229+
230+
Beyond building the toolchain, ``build-toolchain`` also supports the following
231+
(non-exhaustive) set of useful options::
232+
233+
- ``--dry-run``: Perform a dry run build. This is off by default.
234+
- ``--test``: Test the toolchain after it has been compiled. This is off by default.
235+
- ``--distcc``: Use distcc to speed up the build by distributing the c++ part of
236+
the swift build. This is off by default.
237+
238+
More options may be added over time. Please pass ``--help`` to
239+
``build-toolchain`` to see the full set of options.
240+
241+
#### Installing into Xcode
242+
243+
On macOS if one wants to install such a toolchain into Xcode:
244+
245+
1. Untar and copy the toolchain to one of `/Library/Developer/Toolchains/` or
246+
`~/Library/Developer/Toolchains/`. E.x.:
247+
248+
```
249+
$ tar -xzf swift-macOS.tar.gz -C /
250+
$ tar -xzf swift-macOS.tar.gz -C ~/
251+
```
252+
253+
2. Specify the local toolchain for Xcode's use via `Xcode->Toolchains`.
254+
209255
### Build Failures
210256

211257
Make sure you are using the [correct release](#macos) of Xcode.

benchmark/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ set(SWIFT_BENCH_MODULES
141141
single-source/SetTests
142142
single-source/SevenBoom
143143
single-source/Sim2DArray
144+
single-source/SortIntPyramids
144145
single-source/SortLargeExistentials
145146
single-source/SortLettersInPlace
146147
single-source/SortStrings

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,20 @@ macro(configure_build)
4141
endif()
4242

4343
set(PAGE_ALIGNMENT_OPTION "-Xllvm" "-align-module-to-page-size")
44-
execute_process(
45-
COMMAND "touch" "empty.swift"
46-
RESULT_VARIABLE result
47-
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
48-
execute_process(
49-
COMMAND "${SWIFT_EXEC}" ${PAGE_ALIGNMENT_OPTION} "empty.swift"
50-
RESULT_VARIABLE result
51-
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
52-
if(NOT "${result}" MATCHES "0")
53-
set(PAGE_ALIGNMENT_OPTION "")
44+
if(EXISTS "${SWIFT_EXEC}")
45+
# If we are using a pre-built compiler, check if it supports the
46+
# -align-module-to-page-size option.
47+
execute_process(
48+
COMMAND "touch" "empty.swift"
49+
RESULT_VARIABLE result
50+
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
51+
execute_process(
52+
COMMAND "${SWIFT_EXEC}" ${PAGE_ALIGNMENT_OPTION} "empty.swift"
53+
RESULT_VARIABLE result
54+
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
55+
if(NOT "${result}" MATCHES "0")
56+
set(PAGE_ALIGNMENT_OPTION "")
57+
endif()
5458
endif()
5559

5660
# We always infer the SWIFT_LIBRARY_PATH from SWIFT_EXEC unless
@@ -311,6 +315,7 @@ function (swift_benchmark_compile_archopts)
311315
if (is_darwin)
312316
list(APPEND common_options
313317
"-I" "${srcdir}/utils/ObjectiveCTests"
318+
"-I" "${srcdir}/utils/LibProc"
314319
"-F" "${sdk}/../../../Developer/Library/Frameworks"
315320
"-sdk" "${sdk}"
316321
"-no-link-objc-runtime")
@@ -340,6 +345,7 @@ function (swift_benchmark_compile_archopts)
340345
list(APPEND common_options_driver
341346
"-sdk" "${sdk}"
342347
"-F" "${sdk}/../../../Developer/Library/Frameworks"
348+
"-I" "${srcdir}/utils/LibProc"
343349
"-no-link-objc-runtime")
344350
endif()
345351
set(bench_library_objects)

0 commit comments

Comments
 (0)