mirror of https://github.com/bazelbuild/rules_cc
Merge pull request #244 from keith:ks/allow-extra-args-to-cc_sysroot
PiperOrigin-RevId: 682280945 Change-Id: I1f0256f6c99dd1e67efdcd08145700e10ab26e6a
This commit is contained in:
commit
7343c660a4
|
@ -17,13 +17,14 @@ load("//cc/toolchains:args.bzl", "cc_args")
|
|||
|
||||
visibility("public")
|
||||
|
||||
def cc_sysroot(name, sysroot, **kwargs):
|
||||
def cc_sysroot(name, sysroot, args = [], **kwargs):
|
||||
"""Creates args for a sysroot.
|
||||
|
||||
Args:
|
||||
name: (str) The name of the target
|
||||
sysroot: (bazel_skylib's directory rule) The directory that should be the
|
||||
sysroot.
|
||||
args: (List[str]) Extra command-line args to add.
|
||||
**kwargs: kwargs to pass to cc_args.
|
||||
"""
|
||||
cc_args(
|
||||
|
@ -33,7 +34,7 @@ def cc_sysroot(name, sysroot, **kwargs):
|
|||
Label("//cc/toolchains/actions:c_compile"),
|
||||
Label("//cc/toolchains/actions:link_actions"),
|
||||
],
|
||||
args = ["--sysroot={sysroot}"],
|
||||
args = ["--sysroot={sysroot}"] + args,
|
||||
format = {"sysroot": sysroot},
|
||||
**kwargs
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue