Skip to content

narrow nix/ipc-channel/capstone deps to x86 targets - #5391

Merged
RalfJung merged 1 commit into
rust-lang:masterfrom
fneddy:fix_check_non_x86
Oct 6, 2026
Merged

RalfJung merged 1 commit into
rust-lang:masterfrom
fneddy:fix_check_non_x86

Conversation

@fneddy

@fneddy fneddy commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

The cargo::unused_dependencies lint was recently added to Cargo and defaults to warn. Because bootstrap sets CARGO_BUILD_WARNINGS=deny for in-tree builds, this new default warning becomes a hard error.

This change silence the lint the same way we already do in other places.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Oct 6, 2026
@RalfJung

RalfJung commented Oct 6, 2026

Copy link
Copy Markdown
Member

Why would we want to have unused dependencies in Miri?

@fneddy

fneddy commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

ohh i forgot to put that in the commit. because capstone and nix are used only on x86 targets

#[cfg_attr(
not(all(
target_os = "linux",
target_env = "gnu",
any(target_arch = "x86", target_arch = "x86_64")
)),
path = "trace/stub.rs"
)]
pub mod trace;

@RalfJung

RalfJung commented Oct 6, 2026

Copy link
Copy Markdown
Member

Is it not possible to restrict these dependencies to only those targets then?

@RalfJung

RalfJung commented Oct 6, 2026

Copy link
Copy Markdown
Member

I assume this

[target.'cfg(target_os = "linux")'.dependencies]

just needs to be restricted to "x86 only". (And GNU only apparently.)

@fneddy
fneddy force-pushed the fix_check_non_x86 branch from c7d9b21 to d615b15 Compare October 6, 2026 09:11
These three dependencies are only used on x86 targets causing
`cargo::unused_dependencies` warnings on other architectures.
@fneddy
fneddy force-pushed the fix_check_non_x86 branch 2 times, most recently from d615b15 to 7c1dee0 Compare October 6, 2026 09:15
@RalfJung RalfJung changed the title allow unused_dependencies lint in miri Cargo.toml narrow nix/ipc-channel/capstone deps to x86 targets Oct 6, 2026
@RalfJung
RalfJung added this pull request to the merge queue Oct 6, 2026
@RalfJung

RalfJung commented Oct 6, 2026

Copy link
Copy Markdown
Member

Thanks :)

@RalfJung
RalfJung removed this pull request from the merge queue due to a manual request Oct 6, 2026
@RalfJung
RalfJung enabled auto-merge October 6, 2026 10:00
@RalfJung
RalfJung added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 6, 2026
@RalfJung
RalfJung added this pull request to the merge queue Oct 6, 2026
Merged via the queue into rust-lang:master with commit 75eb694 Oct 6, 2026
32 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Waiting for a review to complete label Oct 6, 2026
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