Skip to content

Commit 7b1de48

Browse files
committed
---
yaml --- r: 293343 b: refs/heads/tensorflow c: 65e2eb6 h: refs/heads/master i: 293341: 0cda2e1 293339: efa7ab1 293335: 563f0a5 293327: 61db906 293311: 41b5760
1 parent 01c17f0 commit 7b1de48

File tree

1,087 files changed

+21080
-9444
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,087 files changed

+21080
-9444
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 3a5934d7c5d0324f540fa1174e768c356c749d05
819+
refs/heads/tensorflow: 65e2eb6d8b0ea8da8e9589043f43abdb9786447e
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/CHANGELOG.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
| Contents |
88
| :--------------------- |
9+
| [Swift 5.1](#swift-51) |
910
| [Swift 5.0](#swift-50) |
1011
| [Swift 4.2](#swift-42) |
1112
| [Swift 4.1](#swift-41) |
@@ -24,8 +25,87 @@ CHANGELOG
2425
Swift 5.1
2526
---------
2627

28+
* [SE-0068][]:
29+
30+
`Self` can now be used inside member functions and for function arguments of structs and enums to refer to the containing type.
31+
32+
* [SR-7799][]:
33+
34+
Enum cases can now be matched against an optional enum without
35+
requiring a '?' at the end of the pattern.
36+
37+
```swift
38+
enum Foo { case zero, one }
39+
40+
let foo: Foo? = .zero
41+
42+
switch foo {
43+
case .zero: break
44+
case .one: break
45+
case .none: break
46+
}
47+
```
48+
49+
* `weak` and `unowned` variables can now be used inside types that
50+
declare `Equatable` or `Hashable` conformance.
51+
52+
* [SR-2688][]:
53+
54+
An `@autoclosure` closure can now be a typealias.
55+
56+
```swift
57+
class Foo {
58+
typealias FooClosure = () -> String
59+
func fooFunction(closure: @autoclosure FooClosure) {}
60+
}
61+
```
62+
63+
* [SR-7601][]:
64+
65+
Functions marked with `@objc` can now return `Self`
66+
67+
```swift
68+
@objc func returnDynamicSelf() -> Self { return self }
69+
```
70+
71+
* [SR-2176][]:
72+
73+
Assigning '.none' to an optional enum which also has a 'none' case
74+
or comparing such an enum with '.none' will now warn. Such expressions
75+
create an ambiguity because the compiler chooses Optional.none
76+
over Foo.none.
77+
78+
```swift
79+
enum Foo { case none }
80+
81+
// Assigned Optional.none instead of Foo.none
82+
let foo: Foo? = .none
83+
// Comparing with Optional.none instead of Foo.none
84+
let isEqual = foo == .none
85+
```
86+
87+
The compiler will provide a warning along with a fix-it to
88+
replace '.none' with 'Optional.none' or 'Foo.none' to resolve
89+
the ambiguity.
90+
2791
* Key path expressions can now include references to tuple elements.
2892

93+
* Single-parameter functions accepting values of type `Any` are no
94+
longer preferred over other functions.
95+
96+
```swift
97+
func foo(_: Any) { print("Any") }
98+
func foo<T>(_: T) { print("T") }
99+
foo(0) // prints "Any" in Swift < 5.1, "T" in Swift 5.1
100+
```
101+
102+
* [SE-0245][]:
103+
104+
`Array` and `ContiguousArray` now have `init(unsafeUninitializedCapacity:initializingWith:)`,
105+
which provides access to the array's uninitialized storage.
106+
107+
**Add new entries to the top of this section, not here!**
108+
29109
Swift 5.0
30110
---------
31111

@@ -7431,6 +7511,7 @@ Swift 1.0
74317511
[SE-0228]: <https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md>
74327512
[SE-0230]: <https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md>
74337513
[SE-0235]: <https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md>
7514+
[SE-0245]: <https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md>
74347515

74357516
[SR-106]: <https://bugs.swift.org/browse/SR-106>
74367517
[SR-419]: <https://bugs.swift.org/browse/SR-419>
@@ -7440,12 +7521,16 @@ Swift 1.0
74407521
[SR-1446]: <https://bugs.swift.org/browse/SR-1446>
74417522
[SR-1529]: <https://bugs.swift.org/browse/SR-1529>
74427523
[SR-2131]: <https://bugs.swift.org/browse/SR-2131>
7524+
[SR-2176]: <https://bugs.swift.org/browse/SR-2176>
74437525
[SR-2388]: <https://bugs.swift.org/browse/SR-2388>
74447526
[SR-2394]: <https://bugs.swift.org/browse/SR-2394>
74457527
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>
7528+
[SR-2688]: <https://bugs.swift.org/browse/SR-2688>
74467529
[SR-4248]: <https://bugs.swift.org/browse/SR-4248>
74477530
[SR-5581]: <https://bugs.swift.org/browse/SR-5581>
74487531
[SR-5719]: <https://bugs.swift.org/browse/SR-5719>
74497532
[SR-7139]: <https://bugs.swift.org/browse/SR-7139>
74507533
[SR-7251]: <https://bugs.swift.org/browse/SR-7251>
7534+
[SR-7601]: <https://bugs.swift.org/browse/SR-7601>
7535+
[SR-7799]: <https://bugs.swift.org/browse/SR-7799>
74517536
[SR-8109]: <https://bugs.swift.org/browse/SR-8109>

branches/tensorflow/CMakeLists.txt

Lines changed: 67 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ endif()
1111
list(APPEND CMAKE_MODULE_PATH
1212
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
1313

14-
# Make a job pool for things that can't yet be distributed
15-
cmake_host_system_information(
16-
RESULT localhost_logical_cores QUERY NUMBER_OF_LOGICAL_CORES)
17-
set_property(GLOBAL PROPERTY JOB_POOLS local_jobs=${localhost_logical_cores})
18-
# Put linking in that category
19-
set_property(GLOBAL PROPERTY JOB_POOL_LINK local_jobs)
14+
if(DEFINED CMAKE_JOB_POOLS)
15+
# CMake < 3.11 doesn't support CMAKE_JOB_POOLS. Manually set the property.
16+
set_property(GLOBAL PROPERTY JOB_POOLS "${CMAKE_JOB_POOLS}")
17+
else()
18+
# Make a job pool for things that can't yet be distributed
19+
cmake_host_system_information(
20+
RESULT localhost_logical_cores QUERY NUMBER_OF_LOGICAL_CORES)
21+
set_property(GLOBAL PROPERTY JOB_POOLS local_jobs=${localhost_logical_cores})
22+
# Put linking in that category
23+
set(CMAKE_JOB_POOL_LINK local_jobs)
24+
endif()
2025

2126
ENABLE_LANGUAGE(C)
2227

@@ -101,25 +106,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
101106
message(STATUS "No build type was specified, will default to ${CMAKE_BUILD_TYPE}")
102107
endif()
103108

104-
set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
105-
"Build type for the Swift standard library and SDK overlays [Debug, RelWithDebInfo, Release, MinSizeRel]")
106-
set_property(CACHE SWIFT_STDLIB_BUILD_TYPE PROPERTY
107-
STRINGS "Debug" "RelWithDebInfo" "Release" "MinSizeRel")
108-
109-
is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" swift_optimized)
110-
if(swift_optimized)
111-
set(SWIFT_STDLIB_ASSERTIONS_default FALSE)
112-
else()
113-
set(SWIFT_STDLIB_ASSERTIONS_default TRUE)
114-
endif()
115-
option(SWIFT_STDLIB_ASSERTIONS
116-
"Enable internal checks for the Swift standard library (useful for debugging the library itself, does not affect checks required for safety)"
117-
"${SWIFT_STDLIB_ASSERTIONS_default}")
118-
119-
option(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER
120-
"Use the host compiler and not the internal clang to build the swift runtime"
121-
FALSE)
122-
123109
set(SWIFT_ANALYZE_CODE_COVERAGE FALSE CACHE STRING
124110
"Build Swift with code coverage instrumenting enabled [FALSE, NOT-MERGED, MERGED]")
125111
set_property(CACHE SWIFT_ANALYZE_CODE_COVERAGE PROPERTY
@@ -146,23 +132,6 @@ set(SWIFT_ENABLE_LLD_LINKER TRUE CACHE BOOL
146132
set(SWIFT_ENABLE_GOLD_LINKER TRUE CACHE BOOL
147133
"Enable using the gold linker when available")
148134

149-
set(SWIFT_SDKS "" CACHE STRING
150-
"If non-empty, limits building target binaries only to specified SDKs (despite other SDKs being available)")
151-
152-
set(SWIFT_PRIMARY_VARIANT_SDK "" CACHE STRING
153-
"Primary SDK for target binaries")
154-
set(SWIFT_PRIMARY_VARIANT_ARCH "" CACHE STRING
155-
"Primary arch for target binaries")
156-
157-
set(SWIFT_NATIVE_LLVM_TOOLS_PATH "" CACHE STRING
158-
"Path to the directory that contains LLVM tools that are executable on the build machine")
159-
160-
set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
161-
"Path to the directory that contains Clang tools that are executable on the build machine")
162-
163-
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
164-
"Path to the directory that contains Swift tools that are executable on the build machine")
165-
166135
set(SWIFT_TOOLS_ENABLE_LTO OFF CACHE STRING "Build Swift tools with LTO. One
167136
must specify the form of LTO by setting this to one of: 'full', 'thin'. This
168137
option only affects the tools that run on the host (the compiler), and has
@@ -176,10 +145,6 @@ option(SWIFT_FORCE_OPTIMIZED_TYPECHECKER "Override the optimization setting of
176145
the type checker so that it always compiles with optimization. This eases
177146
debugging after type checking occurs by speeding up type checking" FALSE)
178147

179-
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
180-
"Generate .swiftinterface files alongside .swiftmodule files"
181-
TRUE)
182-
183148
# Allow building Swift with Clang's Profile Guided Optimization
184149
if(SWIFT_PROFDATA_FILE AND EXISTS ${SWIFT_PROFDATA_FILE})
185150
if(NOT CMAKE_C_COMPILER_ID MATCHES Clang)
@@ -188,6 +153,57 @@ if(SWIFT_PROFDATA_FILE AND EXISTS ${SWIFT_PROFDATA_FILE})
188153
add_definitions("-fprofile-instr-use=${SWIFT_PROFDATA_FILE}")
189154
endif()
190155

156+
#
157+
# User-configurable Swift Standard Library specific options.
158+
#
159+
# TODO: Once the stdlib/compiler builds are split, this should be sunk into the
160+
# stdlib cmake.
161+
#
162+
163+
set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
164+
"Build type for the Swift standard library and SDK overlays [Debug, RelWithDebInfo, Release, MinSizeRel]")
165+
set_property(CACHE SWIFT_STDLIB_BUILD_TYPE PROPERTY
166+
STRINGS "Debug" "RelWithDebInfo" "Release" "MinSizeRel")
167+
168+
is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" swift_optimized)
169+
if(swift_optimized)
170+
set(SWIFT_STDLIB_ASSERTIONS_default FALSE)
171+
else()
172+
set(SWIFT_STDLIB_ASSERTIONS_default TRUE)
173+
endif()
174+
option(SWIFT_STDLIB_ASSERTIONS
175+
"Enable internal checks for the Swift standard library (useful for debugging the library itself, does not affect checks required for safety)"
176+
"${SWIFT_STDLIB_ASSERTIONS_default}")
177+
178+
option(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER
179+
"Use the host compiler and not the internal clang to build the swift runtime"
180+
FALSE)
181+
182+
set(SWIFT_SDKS "" CACHE STRING
183+
"If non-empty, limits building target binaries only to specified SDKs (despite other SDKs being available)")
184+
185+
set(SWIFT_PRIMARY_VARIANT_SDK "" CACHE STRING
186+
"Primary SDK for target binaries")
187+
set(SWIFT_PRIMARY_VARIANT_ARCH "" CACHE STRING
188+
"Primary arch for target binaries")
189+
190+
set(SWIFT_NATIVE_LLVM_TOOLS_PATH "" CACHE STRING
191+
"Path to the directory that contains LLVM tools that are executable on the build machine")
192+
193+
set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
194+
"Path to the directory that contains Clang tools that are executable on the build machine")
195+
196+
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
197+
"Path to the directory that contains Swift tools that are executable on the build machine")
198+
199+
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
200+
"Generate .swiftinterface files alongside .swiftmodule files"
201+
TRUE)
202+
203+
option(SWIFT_STDLIB_ENABLE_SIB_TARGETS
204+
"Should we generate sib targets for the stdlib or not?"
205+
FALSE)
206+
191207
#
192208
# User-configurable Android specific options.
193209
#
@@ -234,10 +250,6 @@ option(SWIFT_RUNTIME_CRASH_REPORTER_CLIENT
234250
"Whether to enable CrashReporter integration"
235251
FALSE)
236252

237-
option(SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
238-
"Enable the Swift stable ABI's class marker bit"
239-
FALSE)
240-
241253
set(SWIFT_DARWIN_XCRUN_TOOLCHAIN "XcodeDefault" CACHE STRING
242254
"The name of the toolchain to pass to 'xcrun'")
243255

@@ -315,10 +327,6 @@ option(SWIFT_STDLIB_USE_NONATOMIC_RC
315327
"Build the standard libraries and overlays with nonatomic reference count operations enabled"
316328
FALSE)
317329

318-
option(SWIFT_STDLIB_ENABLE_SIL_OWNERSHIP
319-
"Build the standard libraries and overlays with sil ownership enabled."
320-
FALSE)
321-
322330
option(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS
323331
"Enable runtime function counters and expose the API."
324332
FALSE)
@@ -875,12 +883,11 @@ find_package(PythonInterp REQUIRED)
875883
# Find optional dependencies.
876884
#
877885

878-
# Find libxml.
879-
# FIXME: unify with CLANG_HAVE_LIBXML, which is set in LLVM anyway.
880-
find_package(LibXml2)
881-
option(SWIFT_HAVE_LIBXML
882-
"Whether to build with libxml"
883-
${LIBXML2_FOUND})
886+
if(LLVM_ENABLE_LIBXML2)
887+
find_package(Libxml2 REQUIRED)
888+
else()
889+
find_package(LibXml2)
890+
endif()
884891

885892
# You need libedit linked in order to check if you have el_wgets.
886893
cmake_push_check_state()

branches/tensorflow/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ several hours. Naturally, incremental builds are much faster.
7171
macOS, Ubuntu Linux LTS, and the latest Ubuntu Linux release are the current
7272
supported host development operating systems.
7373

74+
Please make sure you use Python 2.x. Python 3.x is not supported currently.
75+
7476
#### macOS
7577

7678
To build for macOS, you need [Xcode 10.2 beta](https://developer.apple.com/xcode/downloads/).
@@ -295,7 +297,7 @@ To read the compiler documentation, start by installing the
295297
[Sphinx](http://sphinx-doc.org) documentation generator tool by running the
296298
command:
297299

298-
easy_install -U Sphinx
300+
easy_install -U "Sphinx < 2.0"
299301

300302
Once complete, you can build the Swift documentation by changing directory into
301303
[docs](https://github.com/apple/swift/tree/master/docs) and typing `make`. This

branches/tensorflow/apinotes/os.apinotes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Enumerators:
3030
SwiftPrivate: true
3131
Functions:
3232
- Name: _os_log_impl
33-
Availability: nonswift
34-
AvailabilityMsg: 'Use os_log'
33+
SwiftPrivate: true
34+
NullabilityOfRet: O
3535
- Name: _os_log_error_impl
3636
Availability: nonswift
3737
AvailabilityMsg: 'Use os_log'

branches/tensorflow/benchmark/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ set(SWIFT_BENCH_MODULES
134134
single-source/RandomValues
135135
single-source/RangeAssignment
136136
single-source/RangeIteration
137+
single-source/RangeOverlaps
137138
single-source/RangeReplaceableCollectionPlusDefault
138139
single-source/RecursiveOwnedParameter
139140
single-source/ReduceInto

branches/tensorflow/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ macro(configure_sdks_darwin)
7777
set(appletvos_ver "9.1")
7878
set(watchos_ver "2.0")
7979

80+
set(macosx_vendor "apple")
81+
set(iphoneos_vendor "apple")
82+
set(appletvos_vendor "apple")
83+
set(watchos_vendor "apple")
84+
8085
set(macosx_triple_platform "macosx")
8186
set(iphoneos_triple_platform "ios")
8287
set(appletvos_triple_platform "tvos")

0 commit comments

Comments
 (0)