Skip to content

Commit 7343c66

Browse files
Merge pull request #244 from keith:ks/allow-extra-args-to-cc_sysroot
PiperOrigin-RevId: 682280945 Change-Id: I1f0256f6c99dd1e67efdcd08145700e10ab26e6a
2 parents 565dbd6 + b4f54fa commit 7343c66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cc/toolchains/args/sysroot.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ load("//cc/toolchains:args.bzl", "cc_args")
1717

1818
visibility("public")
1919

20-
def cc_sysroot(name, sysroot, **kwargs):
20+
def cc_sysroot(name, sysroot, args = [], **kwargs):
2121
"""Creates args for a sysroot.
2222
2323
Args:
2424
name: (str) The name of the target
2525
sysroot: (bazel_skylib's directory rule) The directory that should be the
2626
sysroot.
27+
args: (List[str]) Extra command-line args to add.
2728
**kwargs: kwargs to pass to cc_args.
2829
"""
2930
cc_args(
@@ -33,7 +34,7 @@ def cc_sysroot(name, sysroot, **kwargs):
3334
Label("//cc/toolchains/actions:c_compile"),
3435
Label("//cc/toolchains/actions:link_actions"),
3536
],
36-
args = ["--sysroot={sysroot}"],
37+
args = ["--sysroot={sysroot}"] + args,
3738
format = {"sysroot": sysroot},
3839
**kwargs
3940
)

0 commit comments

Comments
 (0)