Skip to content

Commit

Permalink
Add doc for new attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinh Tran committed Sep 28, 2023
1 parent 184a9b4 commit f7cc416
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 10 additions & 2 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,16 @@ rust_static_library = rule(
implementation = _rust_static_library_impl,
attrs = dict(
_common_attrs.items() + {
"hdrs": attr.label_list(allow_files = True),
"includes": attr.string_list(),
"hdrs": attr.label_list(
allow_files = True,
doc = (
"The list of header files published by this library to be " +
"directly included by sources in dependent cc rules."
),
),
"includes": attr.string_list(
doc = "The list of include dirs to headers to be added to cc compiling.",
),
}.items(),
),
fragments = ["cpp"],
Expand Down
3 changes: 1 addition & 2 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,7 @@ def _collect_nonstatic_linker_inputs(cc_info):

# get_includes_paths expects a rule context, a list of directories, and
# whether the directories are package-relative and returns a list of exec
# root-relative paths. This handles the need to search for files both in the
# source tree and generated files.
# root-relative paths.
def _get_includes_paths(ctx, dirs, package_relative = True):
execution_relative_dirs = []
for rel_dir in dirs:
Expand Down

0 comments on commit f7cc416

Please sign in to comment.