Skip to content

Commit b793ced

Browse files
authored
Pass testonly and visibility to the alias. (#83)
1 parent 3946bd0 commit b793ced

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build_defs.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def pybind_extension(
6868
name = name + "_copy_so_to_pyd",
6969
src = name + ".so",
7070
out = name + ".pyd",
71-
testonly = kwargs.get("testonly")
71+
testonly = kwargs.get("testonly"),
72+
visibility = kwargs.get("visibility"),
7273
)
7374

7475
native.alias(
@@ -77,6 +78,8 @@ def pybind_extension(
7778
"@platforms//os:windows": name + ".pyd",
7879
"//conditions:default": name + ".so",
7980
}),
81+
testonly = kwargs.get("testonly"),
82+
visibility = kwargs.get("visibility"),
8083
)
8184

8285
# Builds a pybind11 compatible library. This can be linked to a pybind_extension.

0 commit comments

Comments
 (0)