Skip to content

Commit 9fe8eb3

Browse files
allevatobrentleyjones
authored andcommitted
Remove the swift.use_response_files feature
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 <[email protected]>
1 parent de3dc52 commit 9fe8eb3

File tree

4 files changed

+1
-17
lines changed

4 files changed

+1
-17
lines changed

swift/internal/feature_names.bzl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@ SWIFT_FEATURE_GLOBAL_MODULE_CACHE_USES_TMPDIR = "swift.global_module_cache_uses_
194194
# launched in Xcode 13/Swift 5.5.
195195
SWIFT_FEATURE_USE_OLD_DRIVER = "swift.use_old_driver"
196196

197-
# If enabled, actions invoking the Swift driver or frontend may write argument
198-
# lists into response files (i.e., "@args.txt") to avoid passing command lines
199-
# that exceed the system limit. Toolchains typically set this automatically if
200-
# using a sufficiently recent version of Swift (4.2 or higher).
201-
SWIFT_FEATURE_USE_RESPONSE_FILES = "swift.use_response_files"
202-
203197
# If enabled, Swift linking actions will use `swift-autolink-extract` to extract
204198
# the linker arguments. This is required for ELF targets. This is used
205199
# internally to determine the behaviour of the actions across different

swift/internal/swift_autoconfiguration.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ load(
4040
"SWIFT_FEATURE_USE_AUTOLINK_EXTRACT",
4141
"SWIFT_FEATURE_USE_MODULE_WRAP",
4242
"SWIFT_FEATURE_USE_OLD_DRIVER",
43-
"SWIFT_FEATURE_USE_RESPONSE_FILES",
4443
"SWIFT_FEATURE__SUPPORTS_MACROS",
4544
)
4645

@@ -352,7 +351,6 @@ def _create_windows_toolchain(repository_ctx):
352351
SWIFT_FEATURE_EMIT_SWIFTSOURCEINFO,
353352
SWIFT_FEATURE_ENABLE_BATCH_MODE,
354353
SWIFT_FEATURE_ENABLE_SKIP_FUNCTION_BODIES,
355-
SWIFT_FEATURE_USE_RESPONSE_FILES,
356354
SWIFT_FEATURE_NO_EMBED_DEBUG_MODULE,
357355
SWIFT_FEATURE_MODULE_MAP_NO_PRIVATE_HEADERS,
358356
]

swift/toolchains/swift_toolchain.bzl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ load(
6161
"SWIFT_FEATURE_USE_GLOBAL_INDEX_STORE",
6262
"SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE",
6363
"SWIFT_FEATURE_USE_MODULE_WRAP",
64-
"SWIFT_FEATURE_USE_RESPONSE_FILES",
6564
)
6665
load("//swift/internal:features.bzl", "features_for_build_modes")
6766
load("//swift/internal:target_triples.bzl", "target_triples")
@@ -100,7 +99,6 @@ def _all_tool_configs(
10099
env,
101100
swift_executable,
102101
toolchain_root,
103-
use_param_file,
104102
use_autolink_extract,
105103
use_module_wrap,
106104
additional_tools,
@@ -112,8 +110,6 @@ def _all_tool_configs(
112110
swift_executable: A custom Swift driver executable to be used during the
113111
build, if provided.
114112
toolchain_root: The root directory of the toolchain.
115-
use_param_file: If True, the compile action should use a param file for
116-
its arguments.
117113
use_autolink_extract: If True, the link action should use
118114
`swift-autolink-extract` to extract the complier directed linking
119115
flags.
@@ -140,7 +136,7 @@ def _all_tool_configs(
140136
additional_tools = additional_tools,
141137
driver_config = _driver_config(mode = "swiftc"),
142138
resource_set = _swift_compile_resource_set,
143-
use_param_file = use_param_file,
139+
use_param_file = True,
144140
worker_mode = "persistent",
145141
env = env,
146142
)
@@ -469,7 +465,6 @@ def _swift_toolchain_impl(ctx):
469465
SWIFT_FEATURE_NO_GENERATED_MODULE_MAP,
470466
SWIFT_FEATURE_OPT_USES_WMO,
471467
SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE,
472-
SWIFT_FEATURE_USE_RESPONSE_FILES,
473468
])
474469

475470
requested_features.extend(ctx.features)
@@ -483,7 +478,6 @@ def _swift_toolchain_impl(ctx):
483478
env = ctx.attr.env,
484479
swift_executable = swift_executable,
485480
toolchain_root = toolchain_root,
486-
use_param_file = SWIFT_FEATURE_USE_RESPONSE_FILES in ctx.features,
487481
use_autolink_extract = SWIFT_FEATURE_USE_AUTOLINK_EXTRACT in ctx.features,
488482
use_module_wrap = SWIFT_FEATURE_USE_MODULE_WRAP in ctx.features,
489483
additional_tools = [ctx.file.version_file],

swift/toolchains/xcode_swift_toolchain.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ load(
6565
"SWIFT_FEATURE_SUPPORTS_BARE_SLASH_REGEX",
6666
"SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE",
6767
"SWIFT_FEATURE_USE_OLD_DRIVER",
68-
"SWIFT_FEATURE_USE_RESPONSE_FILES",
6968
"SWIFT_FEATURE__FORCE_ALWAYSLINK_TRUE",
7069
"SWIFT_FEATURE__SUPPORTS_CONST_VALUE_EXTRACTION",
7170
"SWIFT_FEATURE__SUPPORTS_MACROS",
@@ -709,7 +708,6 @@ def _xcode_swift_toolchain_impl(ctx):
709708
SWIFT_FEATURE_OPT_USES_WMO,
710709
SWIFT_FEATURE_REMAP_XCODE_PATH,
711710
SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE,
712-
SWIFT_FEATURE_USE_RESPONSE_FILES,
713711
])
714712

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

0 commit comments

Comments
 (0)