Skip to content

Verify llvm-needs-components are not empty and match the --target value #144042

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpaoliello
Copy link
Contributor

@dpaoliello dpaoliello commented Jul 16, 2025

I recently discovered a test with an empty llvm-needs-components entry (fixed in rust-lang/rust#149178) which meant that it didn't work correctly when building Rust with a limited set of LLVM targets.

This change makes a pair of improvements to prevent this issue from creeping in again:

  • When parsing directives with values, compiletest will now raise an error if there is an empty value.
  • Improved the target_specific_tests tidy checker to map targets to LLVM components, to verify that any existing llvm-needs-components contains the target being used.

I also fixed all the issues flagged by the improved tidy checker.

@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2025

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations 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 Jul 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2025

Some changes occurred in tests/codegen/sanitizer

cc @rcvalle

There are changes to the tidy tool.

cc @jieyouxu

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@jieyouxu
Copy link
Member

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned albertlarsan68 Jul 17, 2025
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-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations 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