Skip to content

Merge compiletest directives to do with llvm versions - #160637

Open
WaffleLapkin wants to merge 5 commits into
rust-lang:mainfrom
WaffleLapkin:llvm-version-less-than-three
Open

Merge compiletest directives to do with llvm versions#160637
WaffleLapkin wants to merge 5 commits into
rust-lang:mainfrom
WaffleLapkin:llvm-version-less-than-three

Conversation

@WaffleLapkin

@WaffleLapkin WaffleLapkin commented Aug 6, 2026

Copy link
Copy Markdown
Member

I got confused by min-llvm-version and max-llvm-major-version being different not only in min/max (-major).

... So I decided to refactor everything to just use semver version requirements (//@ llvm-version: <=22, etc). IMO this is much nicer.

r? @jieyouxu


  • I did not use an LLM to create a change in this PR.
  • I used an LLM to create a change in this PR, and I have explained below how it was used.

@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred in coverage tests.

cc @Zalathar

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Aug 6, 2026
@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added F-explicit_tail_calls `#![feature(explicit_tail_calls)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 6, 2026
@WaffleLapkin WaffleLapkin removed the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
assert_eq!(extract_llvm_version("9.0.1-rust-1.43.0-dev"), Version::new(9, 0, 1));
assert_eq!(extract_llvm_version("9.3.1-rust-1.43.0-dev"), Version::new(9, 3, 1));
assert_eq!(extract_llvm_version("10.0.0-rust"), Version::new(10, 0, 0));
// assert_eq!(extract_llvm_version("4.5.6git"), Version::new(4, 5, 6));

@WaffleLapkin WaffleLapkin Aug 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is this an actual version string that llvm outputs? In that case I'll have to (partially?) revert the change to extract_llvm_version...

View changes since the review

@rust-log-analyzer

This comment has been minimized.

Instead of having separate directives for major versions and whatnot,
just use the semver version requirement.
…vm-version`

If we don't want them to combine we should explicitly disallow them...
@WaffleLapkin
WaffleLapkin force-pushed the llvm-version-less-than-three branch from cfd0ca7 to 968a931 Compare August 6, 2026 13:27
@rustbot rustbot added the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
@WaffleLapkin WaffleLapkin removed the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants