Skip to content
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

Remove unnecessary files #1154

Merged
merged 2 commits into from
Feb 25, 2022
Merged
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
16 changes: 8 additions & 8 deletions rust/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -304,47 +304,47 @@ def _generate_sysroot(

# Rustc
sysroot_rustc = _symlink_sysroot_bin(ctx, name, "bin", rustc)
direct_files.extend([sysroot_rustc, rustc])
direct_files.extend([sysroot_rustc])

# Rustc dependencies
sysroot_rustc_lib = None
if rustc_lib:
sysroot_rustc_lib = _symlink_sysroot_tree(ctx, name, rustc_lib)
transitive_file_sets.extend([sysroot_rustc_lib, rustc_lib.files])
transitive_file_sets.extend([sysroot_rustc_lib])

# Rustdoc
sysroot_rustdoc = _symlink_sysroot_bin(ctx, name, "bin", rustdoc)
direct_files.extend([sysroot_rustdoc, rustdoc])
direct_files.extend([sysroot_rustdoc])

# Clippy
sysroot_clippy = None
if clippy:
sysroot_clippy = _symlink_sysroot_bin(ctx, name, "bin", clippy)
direct_files.extend([sysroot_clippy, clippy])
direct_files.extend([sysroot_clippy])

# Cargo
sysroot_cargo = None
if cargo:
sysroot_cargo = _symlink_sysroot_bin(ctx, name, "bin", cargo)
direct_files.extend([sysroot_cargo, cargo])
direct_files.extend([sysroot_cargo])

# Rustfmt
sysroot_rustfmt = None
if rustfmt:
sysroot_rustfmt = _symlink_sysroot_bin(ctx, name, "bin", rustfmt)
direct_files.extend([sysroot_rustfmt, rustfmt])
direct_files.extend([sysroot_rustfmt])

# Llvm tools
sysroot_llvm_tools = None
if llvm_tools:
sysroot_llvm_tools = _symlink_sysroot_tree(ctx, name, llvm_tools)
transitive_file_sets.extend([sysroot_llvm_tools, llvm_tools.files])
transitive_file_sets.extend([sysroot_llvm_tools])

# Rust standard library
sysroot_rust_std = None
if rust_std:
sysroot_rust_std = _symlink_sysroot_tree(ctx, name, rust_std)
transitive_file_sets.extend([sysroot_rust_std, rust_std.files])
transitive_file_sets.extend([sysroot_rust_std])

# Declare a file in the root of the sysroot to make locating the sysroot easy
sysroot_anchor = ctx.actions.declare_file("{}/rust.sysroot".format(name))
Expand Down