Skip to content

skip link step when running clippy #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust/private/clippy.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def _clippy_aspect_impl(target, ctx):
build_flags_files = build_flags_files,
maker_path = clippy_marker.path,
aspect = True,
emit = "dep-info,metadata",
)

# Deny the default-on clippy warning levels.
Expand Down
6 changes: 4 additions & 2 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ def construct_arguments(
build_env_file,
build_flags_files,
maker_path = None,
aspect = False):
aspect = False,
emit = "dep-info,link"):
"""Builds an Args object containing common rustc flags

Args:
Expand All @@ -431,6 +432,7 @@ def construct_arguments(
build_flags_files (list): The output files of a `cargo_build_script` actions containing rustc build flags
maker_path (File): An optional clippy marker file
aspect (bool): True if called in an aspect context.
emit (str): a string to pass to --emit

Returns:
tuple: A tuple of the following items
Expand Down Expand Up @@ -512,7 +514,7 @@ def construct_arguments(
args.add("--codegen=opt-level=" + compilation_mode.opt_level)
args.add("--codegen=debuginfo=" + compilation_mode.debug_info)

args.add("--emit=dep-info,link")
args.add("--emit=" + emit)
args.add("--color=always")
args.add("--target=" + toolchain.target_triple)
if hasattr(ctx.attr, "crate_features"):
Expand Down