From d0a33baeca82494a7946ea2be7bd79568a8e5e3f Mon Sep 17 00:00:00 2001 From: Marco Farrugia Date: Fri, 28 May 2021 01:51:34 -0400 Subject: [PATCH] fix for osx --- python/py_rust_library.bzl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/py_rust_library.bzl b/python/py_rust_library.bzl index 096084b861..931bcaa74c 100644 --- a/python/py_rust_library.bzl +++ b/python/py_rust_library.bzl @@ -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",