Skip to content

Commit

Permalink
Remove the swift.use_response_files feature
Browse files Browse the repository at this point in the history
This was a no-op anyway; toolchains have been setting it, but nothing requests it. Actions use response files if the `ToolInfo` says it supports it.

PiperOrigin-RevId: 474293613
(cherry picked from commit 4f0c2a4)
Signed-off-by: Brentley Jones <github@brentleyjones.com>
  • Loading branch information
allevato authored and brentleyjones committed Jun 24, 2024
1 parent de3dc52 commit 9fe8eb3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
6 changes: 0 additions & 6 deletions swift/internal/feature_names.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ SWIFT_FEATURE_GLOBAL_MODULE_CACHE_USES_TMPDIR = "swift.global_module_cache_uses_
# launched in Xcode 13/Swift 5.5.
SWIFT_FEATURE_USE_OLD_DRIVER = "swift.use_old_driver"

# If enabled, actions invoking the Swift driver or frontend may write argument
# lists into response files (i.e., "@args.txt") to avoid passing command lines
# that exceed the system limit. Toolchains typically set this automatically if
# using a sufficiently recent version of Swift (4.2 or higher).
SWIFT_FEATURE_USE_RESPONSE_FILES = "swift.use_response_files"

# If enabled, Swift linking actions will use `swift-autolink-extract` to extract
# the linker arguments. This is required for ELF targets. This is used
# internally to determine the behaviour of the actions across different
Expand Down
2 changes: 0 additions & 2 deletions swift/internal/swift_autoconfiguration.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ load(
"SWIFT_FEATURE_USE_AUTOLINK_EXTRACT",
"SWIFT_FEATURE_USE_MODULE_WRAP",
"SWIFT_FEATURE_USE_OLD_DRIVER",
"SWIFT_FEATURE_USE_RESPONSE_FILES",
"SWIFT_FEATURE__SUPPORTS_MACROS",
)

Expand Down Expand Up @@ -352,7 +351,6 @@ def _create_windows_toolchain(repository_ctx):
SWIFT_FEATURE_EMIT_SWIFTSOURCEINFO,
SWIFT_FEATURE_ENABLE_BATCH_MODE,
SWIFT_FEATURE_ENABLE_SKIP_FUNCTION_BODIES,
SWIFT_FEATURE_USE_RESPONSE_FILES,
SWIFT_FEATURE_NO_EMBED_DEBUG_MODULE,
SWIFT_FEATURE_MODULE_MAP_NO_PRIVATE_HEADERS,
]
Expand Down
8 changes: 1 addition & 7 deletions swift/toolchains/swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ load(
"SWIFT_FEATURE_USE_GLOBAL_INDEX_STORE",
"SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE",
"SWIFT_FEATURE_USE_MODULE_WRAP",
"SWIFT_FEATURE_USE_RESPONSE_FILES",
)
load("//swift/internal:features.bzl", "features_for_build_modes")
load("//swift/internal:target_triples.bzl", "target_triples")
Expand Down Expand Up @@ -100,7 +99,6 @@ def _all_tool_configs(
env,
swift_executable,
toolchain_root,
use_param_file,
use_autolink_extract,
use_module_wrap,
additional_tools,
Expand All @@ -112,8 +110,6 @@ def _all_tool_configs(
swift_executable: A custom Swift driver executable to be used during the
build, if provided.
toolchain_root: The root directory of the toolchain.
use_param_file: If True, the compile action should use a param file for
its arguments.
use_autolink_extract: If True, the link action should use
`swift-autolink-extract` to extract the complier directed linking
flags.
Expand All @@ -140,7 +136,7 @@ def _all_tool_configs(
additional_tools = additional_tools,
driver_config = _driver_config(mode = "swiftc"),
resource_set = _swift_compile_resource_set,
use_param_file = use_param_file,
use_param_file = True,
worker_mode = "persistent",
env = env,
)
Expand Down Expand Up @@ -469,7 +465,6 @@ def _swift_toolchain_impl(ctx):
SWIFT_FEATURE_NO_GENERATED_MODULE_MAP,
SWIFT_FEATURE_OPT_USES_WMO,
SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE,
SWIFT_FEATURE_USE_RESPONSE_FILES,
])

requested_features.extend(ctx.features)
Expand All @@ -483,7 +478,6 @@ def _swift_toolchain_impl(ctx):
env = ctx.attr.env,
swift_executable = swift_executable,
toolchain_root = toolchain_root,
use_param_file = SWIFT_FEATURE_USE_RESPONSE_FILES in ctx.features,
use_autolink_extract = SWIFT_FEATURE_USE_AUTOLINK_EXTRACT in ctx.features,
use_module_wrap = SWIFT_FEATURE_USE_MODULE_WRAP in ctx.features,
additional_tools = [ctx.file.version_file],
Expand Down
2 changes: 0 additions & 2 deletions swift/toolchains/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ load(
"SWIFT_FEATURE_SUPPORTS_BARE_SLASH_REGEX",
"SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE",
"SWIFT_FEATURE_USE_OLD_DRIVER",
"SWIFT_FEATURE_USE_RESPONSE_FILES",
"SWIFT_FEATURE__FORCE_ALWAYSLINK_TRUE",
"SWIFT_FEATURE__SUPPORTS_CONST_VALUE_EXTRACTION",
"SWIFT_FEATURE__SUPPORTS_MACROS",
Expand Down Expand Up @@ -709,7 +708,6 @@ def _xcode_swift_toolchain_impl(ctx):
SWIFT_FEATURE_OPT_USES_WMO,
SWIFT_FEATURE_REMAP_XCODE_PATH,
SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE,
SWIFT_FEATURE_USE_RESPONSE_FILES,
])

# The new driver had response file bugs in Xcode 13.x that are fixed in
Expand Down

0 comments on commit 9fe8eb3

Please sign in to comment.