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

clippy: make Cc/Rust toolchains optional #2766

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lummax
Copy link

@lummax lummax commented Jul 29, 2024

In certain situations (cross compilation with go) we might not have Cc/Rust toolchains that are available for the transitioned to execution/target platform.

For the linting case with clippy it is acceptable to just skip these targets.

See: https://github.com/lummax/rules_rust_clippy_go_cross_reproducer

In certain situations (cross compilation with `go`) we might not have Cc/Rust
toolchains that are available for the transitioned to execution/target
platform.

For the linting case with `clippy` it is acceptable to just skip these targets.

See: https://github.com/lummax/rules_rust_clippy_go_cross_reproducer
@krasimirgg krasimirgg self-requested a review August 26, 2024 14:03
@krasimirgg
Copy link
Collaborator

Looks good! Could you update this resolving the merge conflicts.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example confuses me. Do you have any toolchains registered at all? Doesn't clippy use of the --sysroot flag and require a valid sysroot?

@lummax
Copy link
Author

lummax commented Oct 10, 2024

The example confuses me. Do you have any toolchains registered at all? Doesn't clippy use of the --sysroot flag and require a valid sysroot?

--toolchain_resolution_debug=.* prints:

      ToolchainResolution:   Selected @@bazel_tools~cc_configure_extension~local_config_cc//:cc-compiler-k8 to run on execution platform @@platforms//host:host
[...]
      ToolchainResolution:   Selected @@rules_go~~go_sdk~go_default_sdk//:go_linux_amd64-impl to run on execution platform @@platforms//host:host
[...]
      ToolchainResolution:   Selected @@rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools//:rust_toolchain to run on execution platform @@platforms//host:host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants