Skip to content

Commit d7f8b74

Browse files
authored
---
yaml --- r: 335870 b: refs/heads/rxwei-patch-1 c: dd40c70 h: refs/heads/master
1 parent e0184a4 commit d7f8b74

File tree

401 files changed

+6257
-2634
lines changed

Some content is hidden

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

401 files changed

+6257
-2634
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: 1b2cb9c72327451e710e415843cf476841c850c0
1018+
refs/heads/rxwei-patch-1: dd40c704964678bc9fd966b4ff99fcde0d176413
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/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ Swift 5.1
9999
foo(0) // prints "Any" in Swift < 5.1, "T" in Swift 5.1
100100
```
101101

102+
* [SE-0245][]:
103+
104+
`Array` and `ContiguousArray` now have `init(unsafeUninitializedCapacity:initializingWith:)`,
105+
which provides access to the array's uninitialized storage.
106+
102107
**Add new entries to the top of this section, not here!**
103108

104109
Swift 5.0
@@ -7506,6 +7511,7 @@ Swift 1.0
75067511
[SE-0228]: <https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md>
75077512
[SE-0230]: <https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md>
75087513
[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>
75097515

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

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -409,30 +409,13 @@ if(MSVC OR "${CMAKE_SIMULATE_ID}" STREQUAL MSVC)
409409
include(ClangClCompileRules)
410410
endif()
411411

412-
precondition(CMAKE_SYSTEM_NAME)
413-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
412+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin OR
413+
EXISTS ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE})
414414
set(SWIFT_BUILD_SYNTAXPARSERLIB_default TRUE)
415415
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
416-
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
417-
if(EXISTS ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE})
418-
set(SWIFT_BUILD_SYNTAXPARSERLIB_default TRUE)
419-
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
420-
else()
421-
set(SWIFT_BUILD_SYNTAXPARSERLIB_default FALSE)
422-
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
423-
endif()
424-
elseif(CMAKE_SYSTEM_NAME STREQUAL Windows)
425-
if(EXISTS ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} AND
426-
CMAKE_CXX_COMPILER_ID STREQUAL Clang)
427-
set(SWIFT_BUILD_SYNTAXPARSERLIB_default TRUE)
428-
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
429-
else()
430-
set(SWIFT_BUILD_SYNTAXPARSERLIB_default FALSE)
431-
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
432-
endif()
433416
else()
434-
set(SWIFT_BUILD_SYNTAXPARSERLIB_default FALSE)
435-
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
417+
set(SWIFT_BUILD_SYNTAXPARSERLIB_default FALSE)
418+
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
436419
endif()
437420
option(SWIFT_BUILD_SYNTAXPARSERLIB
438421
"Build the Swift Syntax Parser library"
@@ -883,12 +866,11 @@ find_package(PythonInterp REQUIRED)
883866
# Find optional dependencies.
884867
#
885868

886-
# Find libxml.
887-
# FIXME: unify with CLANG_HAVE_LIBXML, which is set in LLVM anyway.
888-
find_package(LibXml2)
889-
option(SWIFT_HAVE_LIBXML
890-
"Whether to build with libxml"
891-
${LIBXML2_FOUND})
869+
if(LLVM_ENABLE_LIBXML2)
870+
find_package(Libxml2 REQUIRED)
871+
else()
872+
find_package(LibXml2)
873+
endif()
892874

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

branches/rxwei-patch-1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ To read the compiler documentation, start by installing the
297297
[Sphinx](http://sphinx-doc.org) documentation generator tool by running the
298298
command:
299299

300-
easy_install -U Sphinx
300+
easy_install -U "Sphinx < 2.0"
301301

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

branches/rxwei-patch-1/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ function (swift_benchmark_compile_archopts)
314314

315315
set(common_options
316316
"-c"
317-
"-Xfrontend" "-verify-sil-ownership"
318317
"-target" "${target}"
319318
"-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION})
320319

@@ -344,7 +343,6 @@ function (swift_benchmark_compile_archopts)
344343

345344
set(common_options_driver
346345
"-c"
347-
"-Xfrontend" "-verify-sil-ownership"
348346
"-target" "${target}"
349347
"-${driver_opt}")
350348

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,10 +1881,13 @@ function(add_swift_target_library name)
18811881
endforeach()
18821882

18831883
# Add PrivateFrameworks, rdar://28466433
1884+
set(swiftlib_c_compile_flags_all ${SWIFTLIB_C_COMPILE_FLAGS})
18841885
if(sdk IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
18851886
set(swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
18861887
endif()
18871888

1889+
list(APPEND swiftlib_c_compile_flags_all "-DSWIFT_TARGET_LIBRARY_NAME=${name}")
1890+
18881891
# Add this library variant.
18891892
_add_swift_library_single(
18901893
${VARIANT_NAME}
@@ -1902,7 +1905,7 @@ function(add_swift_target_library name)
19021905
FRAMEWORK_DEPENDS_WEAK ${SWIFTLIB_FRAMEWORK_DEPENDS_WEAK}
19031906
LLVM_COMPONENT_DEPENDS ${SWIFTLIB_LLVM_COMPONENT_DEPENDS}
19041907
FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
1905-
C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS}
1908+
C_COMPILE_FLAGS ${swiftlib_c_compile_flags_all}
19061909
SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all} ${swiftlib_swift_compile_flags_arch} ${swiftlib_swift_compile_private_frameworks_flag}
19071910
LINK_FLAGS ${swiftlib_link_flags_all}
19081911
PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,6 @@ function(_compile_swift_files
235235
list(APPEND swift_flags "-Xfrontend" "-assume-single-threaded")
236236
endif()
237237

238-
if(SWIFTFILE_IS_STDLIB)
239-
list(APPEND swift_flags "-Xfrontend" "-verify-sil-ownership")
240-
list(APPEND swift_flags "-Xfrontend" "-enable-mandatory-semantic-arc-opts")
241-
endif()
242-
243238
if(NOT SWIFT_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING AND SWIFTFILE_IS_STDLIB)
244239
list(APPEND swift_flags "-Xfrontend" "-enforce-exclusivity=unchecked")
245240
endif()

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,28 @@ function(swift_windows_cache_VCVARS)
8080
set(UCRTVersion $ENV{UCRTVersion} CACHE STRING "")
8181
endfunction()
8282

83+
# NOTE(compnerd) we use a macro here as this modifies global variables
84+
macro(swift_swap_compiler_if_needed target)
85+
if(NOT CMAKE_C_COMPILER_ID MATCHES Clang)
86+
if(CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
87+
get_target_property(CLANG_LOCATION clang LOCATION)
88+
get_filename_component(CLANG_LOCATION ${CLANG_LOCATION} DIRECTORY)
89+
90+
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR
91+
"${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
92+
set(CMAKE_C_COMPILER
93+
${CLANG_LOCATION}/clang-cl${CMAKE_EXECUTABLE_SUFFIX})
94+
set(CMAKE_CXX_COMPILER
95+
${CLANG_LOCATION}/clang-cl${CMAKE_EXECUTABLE_SUFFIX})
96+
else()
97+
set(CMAKE_C_COMPILER
98+
${CLANG_LOCATION}/clang${CMAKE_EXECUTABLE_SUFFIX})
99+
set(CMAKE_CXX_COMPILER
100+
${CLANG_LOCATION}/clang++${CMAKE_EXECUTABLE_SUFFIX})
101+
endif()
102+
else()
103+
message(SEND_ERROR "${target} requires a clang based compiler")
104+
endif()
105+
endif()
106+
endmacro()
107+

branches/rxwei-patch-1/docs/ABI/Mangling.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ Globals
112112
global ::= nominal-type 'Mn' // nominal type descriptor
113113
global ::= nominal-type 'Mu' // class method lookup function
114114
global ::= nominal-type 'MU' // ObjC metadata update callback function
115+
global ::= nominal-type 'Ms' // ObjC resilient class stub
116+
global ::= nominal-type 'Mt' // Full ObjC resilient class stub (private)
115117
global ::= module 'MXM' // module descriptor
116118
global ::= context 'MXE' // extension descriptor
117119
global ::= context 'MXX' // anonymous context descriptor

branches/rxwei-patch-1/docs/Testing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ out with ``lit.py -h``. We document some of the more useful ones below:
113113
* ``--param swift_test_mode=<MODE>`` drives the various suffix variations
114114
mentioned above. Again, it's best to get the invocation from the existing
115115
build system targets and modify it rather than constructing it yourself.
116+
* ``--param use_os_stdlib`` will run all tests with the standard libraries
117+
coming from the OS.
116118

117119
##### Remote testing options
118120

0 commit comments

Comments
 (0)