Skip to content

Commit 2a98066

Browse files
author
Guilherme Almeida
committed
Add *_param_file features
Solves: #229
1 parent 5020492 commit 2a98066

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

toolchain/private/cc_toolchains.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ def declare_cc_toolchains(os, zig_sdk_path):
6666
dwp_files = "//:empty",
6767
objcopy_files = "//:empty",
6868
strip_files = "//:empty",
69-
supports_param_files = 0,
69+
supports_param_files = True,
7070
visibility = ["//visibility:private"],
7171
)

toolchain/zig_cc_toolchain.bzl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,38 @@ def _zig_cc_toolchain_config_impl(ctx):
159159
],
160160
)
161161

162+
linker_param_file_feature = feature(
163+
name = "linker_param_file",
164+
flag_sets = [
165+
flag_set(
166+
actions = all_link_actions +
167+
[ACTION_NAMES.cpp_link_static_library],
168+
flag_groups = [
169+
flag_group(
170+
flags = ["@%{linker_param_file}"],
171+
expand_if_available = "linker_param_file",
172+
),
173+
],
174+
),
175+
],
176+
)
177+
178+
archive_param_file_feature = feature(
179+
name = "archive_param_file",
180+
)
181+
182+
compiler_param_file_feature = feature(
183+
name = "compiler_param_file",
184+
)
185+
162186
features = [
163187
compile_and_link_flags,
164188
default_linker_flags,
165189
supports_dynamic_linker,
166190
strip_debug_symbols_feature,
191+
linker_param_file_feature,
192+
archive_param_file_feature,
193+
compiler_param_file_feature,
167194
] + _compilation_mode_features(ctx)
168195

169196
artifact_name_patterns = [

0 commit comments

Comments
 (0)