Skip to content
Success

Changes

Summary

  1. Ensure we do not expect additional linker args to be produced in targets with Swift-produced object files (#378) (details)
Commit 6217a62e8b1280b520162c929519927f6f6c1f0d by github
Ensure we do not expect additional linker args to be produced in targets with Swift-produced object files (#378)

If Swift produced an object in the linked libraries of a target, we allow it to generate additional linker
options, even if it did not run to compile any source files. However, we should not attempt to inject top-level
AST paths for debugging since no actual compile took place, and the paths won't exist at execution time. Use the
object file type when injecting Swift tool usage in these targets so that we don't take the unintended code path.

rdar://144729550
The file was modified Sources/SWBTaskConstruction/TaskProducers/BuildPhaseTaskProducers/SourcesTaskProducer.swift (diff)

Summary

  1. [build-script-helper] Remove unneeded flags for Android (details)
Commit 01834589e0f33a91cacebf8d8d581a20ec78ece6 by finagolfin
[build-script-helper] Remove unneeded flags for Android

Removing the definition of `_GNU_SOURCE` is no longer needed since
swiftlang/swift-tools-support-core#500 made sure the right `strerror_r()` is used.
The file was modified Utilities/build-script-helper.py (diff)

Summary

  1. Bootstrap: update logic to support pre-and post python 3.8 (#8446) (details)
Commit 4bd3f0e57747a9ab7558b6b136e4e256d9df3ba4 by github
Bootstrap: update logic to support pre-and post python 3.8 (#8446)

PR #8373 (commit ID: 0193d5fb8) updated a `shutil.copytree(...)` command
to pass in the `dirs_exists_ok=True` argument. However, Python added
support for the `dirs_exists_ok` argument to `shutil.copytree` in 3.8.

Update the function call to inspect the python version, and only add the
argument if the script is running in a Python version equal, or higher
than 3.8.

rdar://147297864
The file was modified Utilities/bootstrap (diff)

Summary

  1. Add a build flavor to opt-out of BTCFI on OpenBSD. (details)
  2. Revert "Concurrency: remove workaround for silencing UB" (details)
  3. [DebugInfo] Use underlying type of global variables with opaque type (details)
  4. [AST] Introduce `Expr::isAlwaysLeftFolded` (details)
  5. [ASTScope] Allow `try` in unfolded sequence to cover following elements (details)
  6. SILCombine: fix an ownership violation when replacing open existential apply arguments (details)
  7. SILCombine: fix a wrong assert in the SingleBlockOwnedForwardingInstFolder (details)
  8. [ExplicitModuleBuild] Don't leak chained bridging header in objc header (details)
  9. MoveOnlyChecker: Don't follow trivial transitive uses of borrows. (details)
  10. [Driver] Don't hardcode default linker on Linux (details)
  11. stdlib: Address new #StrictMemorySafety warnings. (details)
  12. stdlib: Address unreachable code warnings. (details)
Commit a341ce5570c8bc5296515f9976bee669d46083fb by dsk
Add a build flavor to opt-out of BTCFI on OpenBSD.

To work-around #80059, we need to stop return address signing and
opt-out of BTCFI enforcement via enabling a platform linker option.

We don't want to completely undo the BTCFI work in the rare case that
we later figure out how to properly address the above issue, or allow
users who might want to benefit from BTCFI enforcement and won't use
Concurrency. To do this, condition the existing BTCFI flag enforcement
into a configuration option that defaults to off for now.

Because the new swift-driver needs to "know" whether the frontend is
configured to opt-out or not, and since the new driver communicates with
the frontend via the target info JSON to begin with, we add a field
that emits the build flavor to signal the right behavior.
The file was modified utils/build-script-impl (diff)
The file was modified lib/Driver/UnixToolChains.cpp (diff)
The file was modified CMakeLists.txt (diff)
The file was modified lib/Basic/TargetInfo.cpp (diff)
The file was modified lib/Driver/ToolChains.cpp (diff)
The file was modified include/swift/Basic/Platform.h (diff)
The file was modified lib/Basic/Platform.cpp (diff)
Commit 240a43b0543e0764deffc1c3d86549190b0516ed by github
Revert "Concurrency: remove workaround for silencing UB"
The file was modified test/embedded/dependencies-concurrency-custom-executor.swift (diff)
The file was modified test/embedded/dependencies-concurrency2.swift (diff)
The file was modified stdlib/public/Concurrency/Task.cpp (diff)
The file was modified test/embedded/dependencies-concurrency.swift (diff)
Commit 6abbc0d7545216025f910fa53370e000784c5e08 by anoronha
[DebugInfo] Use underlying type of global variables with opaque type

rdar://144881938
The file was modified lib/IRGen/GenDecl.cpp (diff)
The file was modified lib/IRGen/IRGenModule.h (diff)
The file was modified include/swift/AST/Types.h (diff)
The file was modified lib/IRGen/DebugTypeInfo.cpp (diff)
The file was modified lib/IRGen/DebugTypeInfo.h (diff)
The file was modified lib/IRGen/MetadataRequest.cpp (diff)
The file was addedtest/DebugInfo/global_opaque_var.swift
The file was modified lib/AST/TypeSubstitution.cpp (diff)
Commit d958c0e08081caae394067830c185bf643a77d00 by hamish_knight
[AST] Introduce `Expr::isAlwaysLeftFolded`

Use this to query for `try`-like expressions when it comes to binary
operator folding.
The file was modified include/swift/AST/Expr.h (diff)
The file was modified lib/Sema/TypeCheckExpr.cpp (diff)
The file was modified lib/AST/Expr.cpp (diff)
Commit 2e1c37f1abf8e6382399b7a43b04690060d3359e by hamish_knight
[ASTScope] Allow `try` in unfolded sequence to cover following elements

Rather than fixing-up in the parser, adjust the ASTScope logic such
that a `try` element in a SequenceExpr is considered as covering all
elements to the right of it. Cases where this isn't true are invalid,
and will be diagnosed during sequence folding. e.g:

```
0 * try foo() + bar()
_ = try foo() ~~~ bar() // Assuming `~~~` has lower precedence than `=`
```

This ensures we correctly handle `try` in assignment sequences, and
allows ASTGen to get the behavior for free.

rdar://132872235
The file was modified lib/AST/ASTScopeCreation.cpp (diff)
The file was modified lib/Parse/ParseExpr.cpp (diff)
The file was modified include/swift/AST/ASTScope.h (diff)
The file was modified test/stmt/typed_throws.swift (diff)
The file was modified lib/AST/ASTScopeSourceRange.cpp (diff)
The file was modified lib/ASTGen/Sources/ASTGen/Exprs.swift (diff)
Commit f7f5f9ad96f7381f59a681376c233a84801c9519 by eeckstein
SILCombine: fix an ownership violation when replacing open existential apply arguments

The value of the opened existential must outlive the apply. Otherwise the optimization creates invalid SIL.

rdar://148259849
The file was modified lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp (diff)
The file was modified test/SILOptimizer/sil_combine_ossa.sil (diff)
Commit dff855034c317fa3f5d5d3cacbfe9131d5f0c302 by eeckstein
SILCombine: fix a wrong assert in the SingleBlockOwnedForwardingInstFolder
The file was modified test/SILOptimizer/sil_combine_ossa.sil (diff)
The file was modified lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp (diff)
Commit 80f726a8158b6f0e01b20eb0df089ff00a505488 by stevenwu
[ExplicitModuleBuild] Don't leak chained bridging header in objc header

When generating an objc header from the swift module when a bridging
header is used, make sure to use the original bridging header, not
the chained bridging header. This also avoids incorrectly generated a
header include when no actual bridging header is used, just a chained
bridging header that is coming from a dependency.

rdar://148446465
The file was modified test/ScanDependencies/bridging-header-autochaining.swift (diff)
The file was modified lib/Frontend/Frontend.cpp (diff)
Commit b5d242ad2c4f3e29d0bfcfd0f259a441aacae7a3 by jgroff
MoveOnlyChecker: Don't follow trivial transitive uses of borrows.

Trivial values don't have ownership tracked, so their uses can't affect the
lifetime of the original borrow. Fixes rdar://148457155.
The file was modified lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp (diff)
The file was addedtest/SILOptimizer/moveonly_addresschecker_trivial_read.swift
Commit 500ddfeba4f9cfeb139147eee7136d757b206c3c by ewilde
[Driver] Don't hardcode default linker on Linux

This is the C++ driver counterpart to a change that landed in the Swift
driver a while ago to use the clang-linker to determine what the default
linker is. This is to avoid hard-coding gold, which is deprecated and
not available on some newer Linux distributions. The challenge is that
these newer Linux distributions don't already have Swift so we have to
use the old C++ driver implementation.
The file was modified lib/Driver/UnixToolChains.cpp (diff)
The file was modified test/Driver/baremetal-target.swift (diff)
The file was modified test/Driver/linker.swift (diff)
Commit d32310fb76d1d861fb519cfd0c3c8ac3ab83371b by shortlidge
stdlib: Address new #StrictMemorySafety warnings.
The file was modified stdlib/public/core/Substring.swift (diff)
The file was modified stdlib/public/core/StringBridge.swift (diff)
Commit 14e0eed88fcdec1b69b85c9b740576057a4b2433 by shortlidge
stdlib: Address unreachable code warnings.
The file was modified stdlib/public/core/StringUTF8View.swift (diff)
The file was modified stdlib/public/core/Substring.swift (diff)

Summary

  1. [lldb] Add global opaque archetype test (details)
Commit 436002a85b382bd6d77205ebfe74905c3f67cc10 by anoronha
[lldb] Add global opaque archetype test

rdar://144881938
The file was addedlldb/test/API/lang/swift/opaque_return_frame_var/TestSwiftGlobalOpaque.py
The file was addedlldb/test/API/lang/swift/opaque_return_frame_var/Makefile
The file was modified lldb/test/API/lang/swift/opaque_return/TestBoundOpaqueArchetype.py (diff)
The file was modified lldb/test/API/lang/swift/opaque_return/main.swift (diff)
The file was addedlldb/test/API/lang/swift/opaque_return_frame_var/main.swift