Skip to content

Commit

Permalink
rustc: fix a conditional (#1300)
Browse files Browse the repository at this point in the history
`("bar" or "baz")` always evaluates to "bar", so this conditional ignores `"dylib"`. This seems unintended.
  • Loading branch information
gburgessiv authored Apr 27, 2022
1 parent a6f332f commit c63ad97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _are_linkstamps_supported(feature_configuration, has_grep_includes):
has_grep_includes)

def _should_use_pic(cc_toolchain, feature_configuration, crate_type):
if crate_type in ("cdylib" or "dylib"):
if crate_type in ("cdylib", "dylib"):
return cc_toolchain.needs_pic_for_dynamic_libraries(feature_configuration = feature_configuration)
return False

Expand Down

0 comments on commit c63ad97

Please sign in to comment.