Skip to content

Commit

Permalink
Set links attribute (#400)
Browse files Browse the repository at this point in the history
This was added to rules_rust in
bazelbuild/rules_rust#480 and we started parsing
out the metadata in cargo_raze in #281 but didn't start populating it in
generated BUILD files.

This enables us to remove a hack in rules_rust where we try to infer the
correct value for the `links` attribute if it wasn't set, based on the
name, which in turn will allow us to remove the `crate_name` attribute
completely.
  • Loading branch information
illicitonion authored Mar 18, 2021
1 parent 272f80b commit 2ed7d14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions impl/src/rendering/templates/partials/build_script.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ cargo_build_script(
{%- else %},
{%- endif %}
edition = "{{ crate.edition }}",
{%- if crate.links %}
links = "{{ crate.links }}",
{%- endif %}
{%- if crate.default_deps.build_proc_macro_dependencies %}
proc_macro_deps = [
{%- for dependency in crate.default_deps.build_proc_macro_dependencies %}
Expand Down

0 comments on commit 2ed7d14

Please sign in to comment.