rust-lang / rust-lang/rust

`//@ needs-llvm-components` accepts invalid LLVM components

Open
#138,145 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-compiletest C-enhancement E-needs-design T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

For example, a codegen test:

//@ needs-llvm-components: riscv64
//@ compile-flags: --target riscv64gc-unknown-linux-gnu

#![crate_type = "lib"]
#![no_std]
#![no_core]
#![feature(no_core, lang_items)]
extern crate minicore;

// CHECK: fail!

riscv64 isn't a real LLVM component (only riscv). However, the test never errors; instead it always gets ignored. It seems pretty likely that there are at least a few in-tree tests that never get run because of a typo here.

It should be reasonably easy to keep a list of valid LLVM components and validate against that in compiletest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the compiletest handling for the //@ needs-llvm-components directive and reproduce the shown codegen test with riscv64. Identify how valid LLVM components are represented, then ensure an invalid component such as riscv64 is reported instead of silently causing the test to be ignored; run the relevant compiletest tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.