Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions swift/toolchains/config/compile_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1358,19 +1358,40 @@ def compile_action_configs(
),
)

# Force everyone to use checked continuations Obj-C async bridging,
# regardless of Swift language mode. See
# https://github.com/swiftlang/swift/issues/81846 for context.
#
# The position of this config is important; it must be applied *after* any
# user-specified compile flags to ensure that this one takes precedence.
#
# This can be removed if/when the compiler is fixed in the future and we
# drop support for compilers before the fix.
action_configs.append(
ActionConfigInfo(
actions = [
SWIFT_ACTION_COMPILE,
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
SWIFT_ACTION_DERIVE_FILES,
SWIFT_ACTION_DUMP_AST,
SWIFT_ACTION_PRECOMPILE_C_MODULE,
],
configurators = [_source_files_configurator],
actions = all_compile_action_names(),
configurators = [add_arg(
"-Xfrontend",
"-checked-async-objc-bridging=on",
)],
),
)

action_configs.extend(
[
ActionConfigInfo(
actions = [
SWIFT_ACTION_COMPILE,
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
SWIFT_ACTION_DERIVE_FILES,
SWIFT_ACTION_DUMP_AST,
SWIFT_ACTION_PRECOMPILE_C_MODULE,
],
configurators = [_source_files_configurator],
),
],
)

# Add additional input files to the sandbox (does not modify flags).
action_configs.append(
ActionConfigInfo(
Expand Down