Skip to content

Commit 7cc55ac

Browse files
committed
---
yaml --- r: 340671 b: refs/heads/rxwei-patch-1 c: 0c555ed h: refs/heads/master i: 340669: 25bde6d 340667: c8f248c 340663: f6398cd 340655: f838d5d 340639: ff10281 340607: 4d08e6a
1 parent 45c3a33 commit 7cc55ac

File tree

496 files changed

+6730
-16142
lines changed

Some content is hidden

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

496 files changed

+6730
-16142
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: a516de58bda9f390b1d4ccc73afe1380b4fa3438
1018+
refs/heads/rxwei-patch-1: 0c555edf767765117ea1a604b0a9f278a9f24a55
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,6 @@ option(SWIFT_STDLIB_ENABLE_SIB_TARGETS
223223
"Should we generate sib targets for the stdlib or not?"
224224
FALSE)
225225

226-
227-
set(SWIFT_DARWIN_SUPPORTED_ARCHS "" CACHE STRING
228-
"Semicolon-separated list of architectures to configure on Darwin platforms. \
229-
If left empty all default architectures are configured.")
230-
231-
set(SWIFT_DARWIN_MODULE_ARCHS "" CACHE STRING
232-
"Semicolon-separated list of architectures to configure Swift module-only \
233-
targets on Darwin platforms. These targets are in addition to the full \
234-
library targets.")
235-
236-
237226
#
238227
# User-configurable Android specific options.
239228
#
@@ -845,18 +834,14 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT CMAKE_CROSSCOMPILING)
845834
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
846835
endif()
847836

848-
if(SWIFT_INCLUDE_TOOLS)
849-
message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
850-
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
851-
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
852-
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
853-
message(STATUS "")
854-
else()
855-
message(STATUS "Not building host Swift tools")
856-
message(STATUS "")
857-
endif()
837+
message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
838+
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
839+
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
840+
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
841+
message(STATUS "")
842+
843+
if (SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
858844

859-
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
860845
message(STATUS "Building Swift standard library and overlays for SDKs: ${SWIFT_SDKS}")
861846
message(STATUS " Build type: ${SWIFT_STDLIB_BUILD_TYPE}")
862847
message(STATUS " Assertions: ${SWIFT_STDLIB_ASSERTIONS}")
@@ -865,9 +850,12 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
865850
message(STATUS "Building Swift runtime with:")
866851
message(STATUS " Leak Detection Checker Entrypoints: ${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER}")
867852
message(STATUS "")
853+
868854
else()
855+
869856
message(STATUS "Not building Swift standard library, SDK overlays, and runtime")
870857
message(STATUS "")
858+
871859
endif()
872860

873861
#

branches/rxwei-patch-1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Please make sure you use Python 2.x. Python 3.x is not supported currently.
7676

7777
#### macOS
7878

79-
To build for macOS, you need [Xcode 11 beta](https://developer.apple.com/xcode/downloads/).
79+
To build for macOS, you need [Xcode 10.2 beta](https://developer.apple.com/xcode/downloads/).
8080
The required version of Xcode changes frequently, and is often a beta release.
8181
Check this document or the host information on <https://ci.swift.org> for the
8282
current required version.
@@ -98,7 +98,7 @@ Instructions for installing CMake and Ninja directly can be found [below](#build
9898

9999
For Ubuntu, you'll need the following development dependencies:
100100

101-
sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libcurl4-openssl-dev systemtap-sdt-dev tzdata rsync
101+
sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev libcurl4-openssl-dev systemtap-sdt-dev tzdata rsync
102102

103103
**Note:** LLDB currently requires at least `swig-1.3.40` but will successfully build
104104
with version 2 shipped with Ubuntu.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Name: Accelerate
2+
Enumerators:
3+
- Name: BNNSDataTypeFloatBit
4+
Availability: nonswift
5+
- Name: BNNSDataTypeIntBit
6+
Availability: nonswift
7+
- Name: BNNSDataTypeUIntBit
8+
Availability: nonswift
9+
- Name: BNNSDataTypeIndexedBit
10+
Availability: nonswift
11+
- Name: BNNSDataTypeFloat16
12+
SwiftPrivate: true
13+
- Name: BNNSDataTypeFloat32
14+
SwiftPrivate: true
15+
- Name: BNNSDataTypeInt8
16+
SwiftPrivate: true
17+
- Name: BNNSDataTypeInt16
18+
SwiftPrivate: true
19+
- Name: BNNSDataTypeInt32
20+
SwiftPrivate: true
21+
- Name: BNNSDataTypeUInt8
22+
SwiftPrivate: true
23+
- Name: BNNSDataTypeUInt16
24+
SwiftPrivate: true
25+
- Name: BNNSDataTypeUInt32
26+
SwiftPrivate: true
27+
- Name: BNNSDataTypeIndexed8
28+
SwiftPrivate: true
29+
30+
- Name: BNNSPoolingFunctionMax
31+
SwiftPrivate: true
32+
- Name: BNNSPoolingFunctionAverage
33+
SwiftPrivate: true
34+
35+
- Name: BNNSActivationFunctionIdentity
36+
SwiftPrivate: true
37+
- Name: BNNSActivationFunctionRectifiedLinear
38+
SwiftPrivate: true
39+
- Name: BNNSActivationFunctionLeakyRectifiedLinear
40+
SwiftPrivate: true
41+
- Name: BNNSActivationFunctionSigmoid
42+
SwiftPrivate: true
43+
- Name: BNNSActivationFunctionTanh
44+
SwiftPrivate: true
45+
- Name: BNNSActivationFunctionScaledTanh
46+
SwiftPrivate: true
47+
- Name: BNNSActivationFunctionAbs
48+
SwiftPrivate: true
49+
- Name: BNNSActivationFunctionLinear
50+
SwiftPrivate: true
51+
- Name: BNNSActivationFunctionClamp
52+
SwiftPrivate: true
53+
- Name: BNNSActivationFunctionIntegerLinearSaturate
54+
SwiftPrivate: true
55+
- Name: BNNSActivationFunctionIntegerLinearSaturatePerChannel
56+
SwiftPrivate: true
57+
- Name: BNNSActivationFunctionSoftmax
58+
SwiftPrivate: true
59+
60+
- Name: BNNSFlagsUseClientPtr
61+
SwiftPrivate: true

branches/rxwei-patch-1/apinotes/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set(sources
2+
Accelerate.apinotes
23
Dispatch.apinotes
4+
ScriptingBridge.apinotes
35
os.apinotes
46
)
57

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
Name: ScriptingBridge
3+
Classes:
4+
- Name: SBElementArray
5+
SwiftImportAsNonGeneric: true

branches/rxwei-patch-1/benchmark/single-source/RandomValues.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public func run_RandomIntegersLCG(_ N: Int) {
6363
for _ in 0 ..< 100_000 {
6464
x &+= Int64.random(in: 0...10_000, using: &generator)
6565
}
66-
blackHole(x)
66+
CheckResults(x == 498214315)
6767
}
6868
}
6969

branches/rxwei-patch-1/cmake/modules/AddSwift.cmake

Lines changed: 11 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,6 @@ function(_add_variant_c_compile_flags)
303303
"-fcoverage-mapping")
304304
endif()
305305

306-
if((CFLAGS_ARCH STREQUAL "armv7" OR CFLAGS_ARCH STREQUAL "aarch64") AND
307-
(CFLAGS_SDK STREQUAL "LINUX" OR CFLAGS_SDK STREQUAL "ANDROID"))
308-
list(APPEND result -funwind-tables)
309-
endif()
310-
311306
if("${CFLAGS_SDK}" STREQUAL "ANDROID")
312307
swift_android_libcxx_include_paths(CFLAGS_CXX_INCLUDES)
313308
swift_android_include_for_arch("${CFLAGS_ARCH}" "${CFLAGS_ARCH}_INCLUDE")
@@ -517,12 +512,8 @@ function(_add_variant_link_flags)
517512
NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))
518513
list(APPEND result "-fuse-ld=lld")
519514
elseif(SWIFT_ENABLE_GOLD_LINKER AND
520-
"${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
521-
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
522-
list(APPEND result "-fuse-ld=gold.exe")
523-
else()
524-
list(APPEND result "-fuse-ld=gold")
525-
endif()
515+
"${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
516+
list(APPEND result "-fuse-ld=gold")
526517
endif()
527518
endif()
528519

@@ -936,17 +927,6 @@ function(_add_swift_library_single target name)
936927
endif()
937928
endif()
938929

939-
# Only build the modules for any arch listed in the *_MODULE_ARCHITECTURES.
940-
if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS
941-
AND SWIFTLIB_SINGLE_ARCHITECTURE IN_LIST SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_MODULE_ARCHITECTURES)
942-
# Create dummy target to hook up the module target dependency.
943-
add_custom_target("${target}"
944-
DEPENDS
945-
"${swift_module_dependency_target}")
946-
947-
return()
948-
endif()
949-
950930
set(SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS)
951931
foreach(object_library ${SWIFTLIB_SINGLE_INCORPORATE_OBJECT_LIBRARIES})
952932
list(APPEND SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS
@@ -1866,13 +1846,8 @@ function(add_swift_target_library name)
18661846
list(APPEND swiftlib_link_flags_all "-Wl,-z,defs")
18671847
endif()
18681848

1869-
set(sdk_supported_archs
1870-
${SWIFT_SDK_${sdk}_ARCHITECTURES}
1871-
${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES})
1872-
list(REMOVE_DUPLICATES sdk_supported_archs)
1873-
18741849
# For each architecture supported by this SDK
1875-
foreach(arch ${sdk_supported_archs})
1850+
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES})
18761851
# Configure variables for this subdirectory.
18771852
set(VARIANT_SUFFIX "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
18781853
set(VARIANT_NAME "${name}${VARIANT_SUFFIX}")
@@ -1994,38 +1969,11 @@ function(add_swift_target_library name)
19941969
endforeach()
19951970
endif()
19961971

1997-
if(arch IN_LIST SWIFT_SDK_${sdk}_ARCHITECTURES)
1998-
# Note this thin library.
1999-
list(APPEND THIN_INPUT_TARGETS ${VARIANT_NAME})
2000-
endif()
1972+
# Note this thin library.
1973+
list(APPEND THIN_INPUT_TARGETS ${VARIANT_NAME})
20011974
endif()
20021975
endforeach()
20031976

2004-
# Configure module-only targets
2005-
if(NOT SWIFT_SDK_${sdk}_ARCHITECTURES
2006-
AND SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES)
2007-
set(_target "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
2008-
2009-
# Create unified sdk target
2010-
add_custom_target("${_target}")
2011-
2012-
foreach(_arch ${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES})
2013-
set(_variant_suffix "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${_arch}")
2014-
set(_module_variant_name "${name}-swiftmodule-${_variant_suffix}")
2015-
2016-
add_dependencies("${_target}" ${_module_variant_name})
2017-
2018-
# Add Swift standard library targets as dependencies to the top-level
2019-
# convenience target.
2020-
if(TARGET "swift-stdlib${_variant_suffix}")
2021-
add_dependencies("swift-stdlib${_variant_suffix}"
2022-
"${_target}")
2023-
endif()
2024-
endforeach()
2025-
2026-
return()
2027-
endif()
2028-
20291977
if(NOT SWIFTLIB_OBJECT_LIBRARY)
20301978
# Determine the name of the universal library.
20311979
if(SWIFTLIB_SHARED)
@@ -2116,35 +2064,12 @@ function(add_swift_target_library name)
21162064
endforeach()
21172065
endif()
21182066

2119-
swift_is_installing_component(
2120-
"${SWIFTLIB_INSTALL_IN_COMPONENT}"
2121-
is_installing)
2122-
2123-
# Add the arch-specific library targets to the global exports.
2124-
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES})
2125-
set(_variant_name "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
2126-
if(NOT TARGET "${_variant_name}")
2127-
continue()
2128-
endif()
2129-
2130-
if(is_installing)
2131-
set_property(GLOBAL APPEND
2132-
PROPERTY SWIFT_EXPORTS ${_variant_name})
2133-
else()
2134-
set_property(GLOBAL APPEND
2135-
PROPERTY SWIFT_BUILDTREE_EXPORTS ${_variant_name})
2136-
endif()
2137-
endforeach()
2138-
2139-
# Add the swiftmodule-only targets to the lipo target depdencies.
2140-
foreach(arch ${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES})
2141-
set(_variant_name "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
2142-
if(NOT TARGET "${_variant_name}")
2143-
continue()
2144-
endif()
2145-
2146-
add_dependencies("${lipo_target}" "${_variant_name}")
2147-
endforeach()
2067+
swift_is_installing_component("${SWIFTLIB_INSTALL_IN_COMPONENT}" is_installing)
2068+
if(NOT is_installing)
2069+
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${VARIANT_NAME})
2070+
else()
2071+
set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${VARIANT_NAME})
2072+
endif()
21482073

21492074
# If we built static variants of the library, create a lipo target for
21502075
# them.

branches/rxwei-patch-1/cmake/modules/StandaloneOverlay.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
6565
set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
6666
"Build type for the Swift standard library and SDK overlays.")
6767

68-
set(SWIFT_DARWIN_SUPPORTED_ARCHS "" CACHE STRING
69-
"Semicolon-separated list of architectures to configure on Darwin platforms. \
70-
If left empty all default architectures are configured.")
71-
72-
set(SWIFT_DARWIN_MODULE_ARCHS "" CACHE STRING
73-
"Semicolon-separated list of architectures to configure Swift module-only \
74-
targets on Darwin platforms. These targets are in addition to the full \
75-
library targets.")
76-
77-
7868
# -----------------------------------------------------------------------------
7969
# Constants
8070

branches/rxwei-patch-1/cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function(_report_sdk prefix)
2828
message(STATUS " ${arch} LIB: ${${arch}_LIB}")
2929
endforeach()
3030
elseif("${prefix}" STREQUAL "ANDROID")
31-
message(STATUS " NDK: $ENV{SWIFT_ANDROID_NDK_PATH}")
31+
message(STATUS " NDK Dir: $ENV{SWIFT_ANDROID_NDK_PATH}")
3232
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
3333
swift_android_include_for_arch(${arch} ${arch}_INCLUDE)
3434
swift_android_lib_for_arch(${arch} ${arch}_LIB)
@@ -51,9 +51,6 @@ function(_report_sdk prefix)
5151
message(STATUS " Triple name: ${SWIFT_SDK_${prefix}_TRIPLE_NAME}")
5252
endif()
5353
message(STATUS " Architectures: ${SWIFT_SDK_${prefix}_ARCHITECTURES}")
54-
if(SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES)
55-
message(STATUS " Module Architectures: ${SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES}")
56-
endif()
5754
if(NOT prefix IN_LIST SWIFT_APPLE_PLATFORMS)
5855
if(SWIFT_BUILD_STDLIB)
5956
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
@@ -144,30 +141,9 @@ macro(configure_sdk_darwin
144141
set(SWIFT_SDK_${prefix}_LIB_SUBDIR "${xcrun_name}")
145142
set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "${version_min_name}")
146143
set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
144+
set(SWIFT_SDK_${prefix}_ARCHITECTURES "${architectures}")
147145
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "MACHO")
148146

149-
set(SWIFT_SDK_${prefix}_ARCHITECTURES ${architectures})
150-
if(SWIFT_DARWIN_SUPPORTED_ARCHS)
151-
list_intersect(
152-
"${architectures}" # lhs
153-
"${SWIFT_DARWIN_SUPPORTED_ARCHS}" # rhs
154-
SWIFT_SDK_${prefix}_ARCHITECTURES) # result
155-
endif()
156-
157-
list_intersect(
158-
"${SWIFT_DARWIN_MODULE_ARCHS}" # lhs
159-
"${architectures}" # rhs
160-
SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES) # result
161-
162-
# Ensure the architectures and module-only architectures lists are mutually
163-
# exclusive.
164-
list_subtract(
165-
"${SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES}" # lhs
166-
"${SWIFT_SDK_${prefix}_ARCHITECTURES}" # rhs
167-
SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES) # result
168-
169-
# Configure variables for _all_ architectures even if we aren't "building"
170-
# them because they aren't supported.
171147
foreach(arch ${architectures})
172148
# On Darwin, all archs share the same SDK path.
173149
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${SWIFT_SDK_${prefix}_PATH}")
@@ -225,14 +201,10 @@ macro(configure_sdk_unix name architectures)
225201
endif()
226202

227203
# Get the prebuilt suffix to create the correct toolchain path when using the NDK
228-
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
229-
set(_swift_android_prebuilt_build darwin-x86_64)
230-
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
231-
set(_swift_android_prebuilt_build linux-x86_64)
232-
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
233-
set(_swift_android_prebuilt_build Windows-x86_64)
234-
else()
235-
message(SEND_ERROR "cannot cross-compile to android from ${CMAKE_HOST_SYSTEM_NAME}")
204+
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
205+
set(_swift_android_prebuilt_build "darwin-x86_64")
206+
elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
207+
set(_swift_android_prebuilt_build "linux-x86_64")
236208
endif()
237209
if("${arch}" STREQUAL "i686")
238210
set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH

0 commit comments

Comments
 (0)