Skip to content

Commit c01a257

Browse files
committed
fix: reduce sandbox size for d_library targets
Fixes #112
1 parent a104bea commit c01a257

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

d/private/rules/common.bzl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,15 @@ def compilation_action(ctx, target_type = TARGET_TYPE.LIBRARY):
157157
else:
158158
fail("Unsupported target type: %s" % target_type)
159159

160+
inputs = depset(
161+
ctx.files.srcs + ctx.files.string_srcs,
162+
transitive = [toolchain.d_compiler[DefaultInfo].default_runfiles.files] +
163+
[d.interface_srcs for d in d_deps] +
164+
(([d.libraries for d in d_deps] + [c_libraries]) if target_type != TARGET_TYPE.LIBRARY else []),
165+
)
166+
160167
ctx.actions.run(
161-
inputs = depset(
162-
ctx.files.srcs + ctx.files.string_srcs,
163-
transitive = [toolchain.d_compiler[DefaultInfo].default_runfiles.files] +
164-
[d.interface_srcs for d in d_deps] +
165-
[d.libraries for d in d_deps] +
166-
[c_libraries],
167-
),
168+
inputs = inputs,
168169
outputs = [output],
169170
executable = toolchain.d_compiler[DefaultInfo].files_to_run,
170171
arguments = [args],

0 commit comments

Comments
 (0)