Skip to content
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

tests/run-make/print-target-list --print=sysroot check fails for experimental llvm targets #127895

Closed
jieyouxu opened this issue Jul 18, 2024 · 3 comments · Fixed by #129605
Closed
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-AVR Target: AVR processors (ATtiny, ATmega, etc.) O-csky Target: glaCSKY above covers over me~ O-motorola68k Target: Rust from the parallel universe where the Amiga won. O-xtensa 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.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Jul 18, 2024

In #127877 @Rejyr noticed tests/run-make/print-target-list was failing for csky-unknown-linux-gnuabiv2 (and other experimental llvm components) on the x86_64-gnu-llvm-17 CI builder with

# snip
error: could not create LLVM TargetMachine for triple: csky-unknown-linux-gnuabiv2: No available targets are compatible with triple "csky-unknown-linux-gnuabiv2"
# snip

#125702 (specifically #125702 (comment)) it was already noticed that tests/run-make/print-target-list seemed to fail for csky-unknown-linux-gnuabiv2.

Is this expected? Or what is the expected test behavior when

rustc --target csky-unknown-linux-gnuabiv2 --print sysroot

is ran (on the x86_64-gnu-llvm-17 CI builder)?

Or is it expected that we should skip trying to run this check for the csky-unknown-linux-gnuabiv2 and other experimental llvm component targets?


Update: this is also true for experimental llvm components avr, m68k, csky and xtensa, not too sure what the correct behavior is. Currently these targets are skipped by print-target-list's --print=sysroot check.

@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. O-csky Target: glaCSKY above covers over me~ labels Jul 18, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 18, 2024
@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-run-make Area: port run-make Makefiles to rmake.rs and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 18, 2024
@Dirreke
Copy link
Contributor

Dirreke commented Jul 18, 2024

Is there any COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS set by us for this jobs?. It seems like the same issue. I will check it later.

@Dirreke
Copy link
Contributor

Dirreke commented Jul 18, 2024

Well, I'm not familiar with rmake.

However, the right logic should be like:

If COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS is not set and LLVM_COMPONENTS do not have the csky, then we could skip it.

COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS is set at src/ci/run.sh, and it is only used at src/tools/compiletest/src/header.rs now.

@jieyouxu
Copy link
Member Author

Ah thank you, that sounds about right.

@jieyouxu jieyouxu changed the title tests/run-make/print-target-list fails for csky-unknown-linux-gnuabiv2 tests/run-make/print-target-list fails for experimental llvm targets Aug 26, 2024
@jieyouxu jieyouxu added O-AVR Target: AVR processors (ATtiny, ATmega, etc.) O-motorola68k Target: Rust from the parallel universe where the Amiga won. O-xtensa labels Aug 26, 2024
@jieyouxu jieyouxu changed the title tests/run-make/print-target-list fails for experimental llvm targets tests/run-make/print-target-list --print=sysroot check fails for experimental llvm targets Aug 26, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 31, 2024
…Mark-Simulacrum

Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes rust-lang#129390.
Fixes rust-lang#127895.

cc `@petrochenkov` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
@bors bors closed this as completed in d354d4d Aug 31, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 31, 2024
Rollup merge of rust-lang#129605 - jieyouxu:needs-llvm-components, r=Mark-Simulacrum

Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes rust-lang#129390.
Fixes rust-lang#127895.

cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-AVR Target: AVR processors (ATtiny, ATmega, etc.) O-csky Target: glaCSKY above covers over me~ O-motorola68k Target: Rust from the parallel universe where the Amiga won. O-xtensa 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
3 participants