Skip to content

Commit d50ea6b

Browse files
committed
Merge branch 'master' into RemoveRedundantBufferZeroingNSStringAPI
2 parents 0046550 + dee6c0b commit d50ea6b

File tree

395 files changed

+6136
-5071
lines changed

Some content is hidden

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

395 files changed

+6136
-5071
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ sudo apt-get install \
149149
**Note:** LLDB currently requires at least `swig-1.3.40` but will successfully build
150150
with version 2 shipped with Ubuntu.
151151

152+
**Note:** For Ubuntu 20.04, use `libpython2-dev` in place of the libpython-dev package above.
153+
152154
Build instructions for Ubuntu 14.04 LTS can be found [here](docs/Ubuntu14.md).
153155

154156
### Getting Sources for Swift and Related Projects

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function (add_swift_benchmark_library objfile_out sibfile_out swiftmodule_out)
189189
DEPENDS ${stdlib_dependencies} ${sources} ${BENCHLIB_DEPENDS}
190190
COMMAND "${SWIFT_EXEC}"
191191
${BENCHLIB_LIBRARY_FLAGS}
192-
"-force-single-frontend-invocation"
192+
"-whole-module-optimization"
193193
"-parse-as-library"
194194
"-module-name" "${module_name}"
195195
"-emit-module" "-emit-module-path" "${swiftmodule}"
@@ -209,7 +209,7 @@ function (add_swift_benchmark_library objfile_out sibfile_out swiftmodule_out)
209209
${stdlib_dependencies} ${sources} ${BENCHLIB_DEPENDS}
210210
COMMAND "${SWIFT_EXEC}"
211211
${BENCHLIB_LIBRARY_FLAGS}
212-
"-force-single-frontend-invocation"
212+
"-whole-module-optimization"
213213
"-parse-as-library"
214214
"-module-name" "${module_name}"
215215
"-emit-sib"
@@ -574,7 +574,7 @@ function (swift_benchmark_compile_archopts)
574574
${SWIFT_BENCH_SIBFILES} "${source}"
575575
COMMAND "${SWIFT_EXEC}"
576576
${common_swift4_options}
577-
"-force-single-frontend-invocation"
577+
"-whole-module-optimization"
578578
"-emit-module" "-module-name" "${module_name}"
579579
"-I" "${objdir}"
580580
"-o" "${objdir}/${module_name}.o"

benchmark/single-source/ProtocolDispatch2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import TestsUtils
1919
public let ProtocolDispatch2 = BenchmarkInfo(
2020
name: "ProtocolDispatch2",
2121
runFunction: run_ProtocolDispatch2,
22-
tags: [.validation, .abstraction])
22+
tags: [.validation, .abstraction, .cpubench])
2323

2424
protocol Pingable { func ping() -> Int; func pong() -> Int}
2525

cmake/modules/AddSwift.cmake

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ include(SwiftWindowsSupport)
55
include(SwiftAndroidSupport)
66

77
function(_swift_gyb_target_sources target scope)
8+
file(GLOB GYB_UNICODE_DATA ${SWIFT_SOURCE_DIR}/utils/UnicodeData/*)
9+
file(GLOB GYB_STDLIB_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_support.py)
10+
file(GLOB GYB_SYNTAX_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/*)
11+
file(GLOB GYB_SOURCEKIT_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_sourcekit_support/*)
12+
set(GYB_SOURCES
13+
${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py
14+
${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py
15+
${GYB_UNICODE_DATA}
16+
${GYB_STDLIB_SUPPORT}
17+
${GYB_SYNTAX_SUPPORT}
18+
${GYB_SOURCEKIT_SUPPORT})
19+
820
foreach(source ${ARGN})
921
get_filename_component(generated ${source} NAME_WLE)
1022
get_filename_component(absolute ${source} REALPATH)
@@ -17,6 +29,7 @@ function(_swift_gyb_target_sources target scope)
1729
COMMAND
1830
${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/${generated}.tmp
1931
DEPENDS
32+
${GYB_SOURCES}
2033
${absolute})
2134
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${generated} PROPERTIES
2235
GENERATED TRUE)
@@ -78,11 +91,10 @@ endfunction()
7891

7992
# Usage:
8093
# _add_host_variant_c_compile_link_flags(
81-
# ANALYZE_CODE_COVERAGE analyze_code_coverage
8294
# RESULT_VAR_NAME result_var_name
8395
# )
8496
function(_add_host_variant_c_compile_link_flags)
85-
set(oneValueArgs RESULT_VAR_NAME ANALYZE_CODE_COVERAGE)
97+
set(oneValueArgs RESULT_VAR_NAME)
8698
cmake_parse_arguments(CFLAGS
8799
""
88100
"${oneValueArgs}"
@@ -131,11 +143,6 @@ function(_add_host_variant_c_compile_link_flags)
131143
"-m${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_VERSION_MIN_NAME}-version-min=${DEPLOYMENT_VERSION}")
132144
endif()
133145

134-
if(CFLAGS_ANALYZE_CODE_COVERAGE)
135-
list(APPEND result "-fprofile-instr-generate"
136-
"-fcoverage-mapping")
137-
endif()
138-
139146
_compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)
140147
if (_lto_flag_out)
141148
list(APPEND result "${_lto_flag_out}")
@@ -146,9 +153,7 @@ endfunction()
146153

147154

148155
function(_add_host_variant_c_compile_flags target)
149-
_add_host_variant_c_compile_link_flags(
150-
ANALYZE_CODE_COVERAGE FALSE
151-
RESULT_VAR_NAME result)
156+
_add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
152157
target_compile_options(${target} PRIVATE
153158
${result})
154159

@@ -313,9 +318,7 @@ function(_add_host_variant_c_compile_flags target)
313318
endfunction()
314319

315320
function(_add_host_variant_link_flags target)
316-
_add_host_variant_c_compile_link_flags(
317-
ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
318-
RESULT_VAR_NAME result)
321+
_add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
319322
target_link_options(${target} PRIVATE
320323
${result})
321324

docs/CompilerPerformance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ running in, and often to perform separate analysis for each mode. The
100100
significant modes are:
101101

102102
- **Primary-file** vs. **whole-module**: this varies depending on whether the
103-
driver is run with the flag `-wmo`, `-whole-module-optimization` or
104-
`-force-single-frontend-invocation` (all these options are synonymous).
103+
driver is run with the flag `-wmo` (a.k.a. `-whole-module-optimization`).
105104

106105
- **Batch** vs. **single-file** primary-file mode. This distinction refines
107106
the behaviour of primary-file mode, with the new batch mode added in the

0 commit comments

Comments
 (0)