Skip to content

build: fix clippy on Windows GNU with Rust 1.95#329

Merged
JingsongLi merged 1 commit into
apache:mainfrom
JaydenHD:codex/windows-gnu-rust-lld
May 20, 2026
Merged

build: fix clippy on Windows GNU with Rust 1.95#329
JingsongLi merged 1 commit into
apache:mainfrom
JaydenHD:codex/windows-gnu-rust-lld

Conversation

@JaydenHD
Copy link
Copy Markdown
Contributor

@JaydenHD JaydenHD commented May 19, 2026

Purpose

Linked issue: N/A

With Rust stable 1.95.0 on x86_64-pc-windows-gnu, cargo clippy can fail before reaching project lints because generated build-script executables are not runnable with the default GNU linker output (os error 193). A minimal rustc hello world has the same failure on this toolchain, while linking with rust-lld produces a runnable executable.

This configures the Windows GNU target to use the Rust-provided rust-lld linker so clippy can run normally.

Brief change log

  • Add .cargo/config.toml with target.x86_64-pc-windows-gnu.linker = rust-lld.
  • Keep the change scoped to the Windows GNU target only.

Tests

  • cargo clippy --all-targets --workspace --features fulltext,vortex -- -D warnings

API and Format

No API change.
No storage format change.

Documentation

No documentation update required.

@JaydenHD JaydenHD force-pushed the codex/windows-gnu-rust-lld branch from f845ec6 to c108902 Compare May 20, 2026 04:30
@JaydenHD JaydenHD changed the title build: use rust-lld for windows gnu target build: fix clippy on Windows GNU with Rust 1.95 May 20, 2026
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit 94a2954 into apache:main May 20, 2026
8 checks passed
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.

2 participants