Skip to content

Commit

Permalink
fix for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarrugi committed May 28, 2021
1 parent 5099708 commit d0a33ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/py_rust_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ def py_rust_library(name, **kwargs):
rust_library(
name = mangled,
crate_type = "cdylib",
rustc_flags = select({
"@rules_rust//rust/platform:osx": [
"--codegen=link-arg=-undefined",
"--codegen=link-arg=dynamic_lookup",
],
"//conditions:default": [],
}),
**kwargs
)

# TODO(windows): The extension should be .pyd
renamed = name + ".so"
native.genrule(
name = name + "_rename",
Expand Down

0 comments on commit d0a33ba

Please sign in to comment.