You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a crate that uses pyo3 to create a Python extension module.
On macOS, special link flags are required:
rustc_flags = selects.with_or({
(
"@io_bazel_rules_rust//rust/platform:x86_64-apple-darwin",
): [
"-Clink-arg=-undefined",
"-Clink-arg=dynamic_lookup",
],
"//conditions:default": [],
}),
Without them, the linker on macOS fails, as the Python API is not
available until runtime.
rules_rust's clippy implementation was passing --emit=dep-info,link
to the clippy invocation, causing a clippy run to fail with linking
errors. This patch changes the invocation to use
--emit=dep-info,metadata instead, which is what cargo uses. It also
shaves a bit of time off the check, as linking no longer needs to happen.
Tangentially related to bazelbuild#428 and bazelbuild#421 - currently the clippy aspect
seems to be falling back on a non-worker compile, so it's still
noticeably slower than running cargo clippy directly when minor
changes have been made.
0 commit comments