Skip to content

Check cfg on features that stage0 compiler support #1798

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

a4lg
Copy link
Contributor

@a4lg a4lg commented May 14, 2025

Since the bootstrap compiler of Rust is bumped to the commit rust-lang/rust@5dadfd5 (version 1.88.0-beta.3 2025-05-11), some features should be safe to enable cfg checks.

This is a superset of the revert of #1768.

RISC-V Features:

  • "zicsr"
  • "zicntr"
  • "zihpm"
  • "zifencei"
  • "zihintntl"
  • "zihintpause"
  • "zimop"
  • "zicboz"
  • "zicond"
  • "ztso"
  • "zfa"
  • "zca"
  • "zcb"
  • "zcmop"
  • "b"

x86 Features:

  • "amx-avx512"
  • "amx-fp8"
  • "amx-movrs"
  • "amx-tf32"
  • "amx-transpose"

@rustbot
Copy link
Collaborator

rustbot commented May 14, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
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

@a4lg
Copy link
Contributor Author

a4lg commented May 14, 2025

@sayantn
Did something change in the Rust CI on the std rustdoc process? I'm wondering because I'm failing to reproduce a CI failure (to make sure that this PR is safe enough even if the Rust repository contains this).
While I'm investigating for this PR, I found that some vector extensions like zve32x should have been added with without cfg check: true (according to #1768) for being too new but added without it in #1770 and did not (itself) cause any errors in rust-lang/rust#140389.

A link to a CI failure (e.g. a comment by a bot) will be very helpful for me.

@sayantn
Copy link
Contributor

sayantn commented May 14, 2025

That is quite interesting, I honestly have no idea why it did work as intended. Also, I think there were some changes to the rustc bootstrapping procedure lately, as I have noticed a little on the T-infra zulip streams 😅. You are sure that zve32x wasn't available with rustc 1.87 (the beta at the time it got merged in rustc) right? (Sorry can't check myself, don't have my laptop currently). Probably @Amanieu can shed some light on this

@a4lg
Copy link
Contributor Author

a4lg commented May 14, 2025

@sayantn
Interestingly, yes. zve32x is added by the PR rust-lang/rust#138742 but it's clearly landed on 1.88. not 1.87.
I tried to break CI by removing without cfg check: true from RISC-V's zam (which is not supported by Rust's feature handling system) but it still succeeds (even dist-riscv64-linux).

After I mentioned you, I finally managed to break the CI by adding an unknown feature without without cfg check: true to x86.rs (fails on x86_64-gnu-llvm-19-2 but that was not an obvious rustdoc error).

@a4lg
Copy link
Contributor Author

a4lg commented May 15, 2025

Rust's CI jobs x86_64-gnu-llvm-{19,20}-{1,2,3} (where most of the tests happen) succeeded on my local CI setup (Docker/Podman-based) emulating GitHub Actions with stdarch plus this PR.

Note: due to a possible bug, I had to run Docker images in the interactive mode ./src/ci/docker/run.sh --dev [IMAGE_NAME] and run each job as follows; otherwise specifying *-llvm-*-{2,3} tests using citool will run *-llvm-*-1 instead).

SCRIPT=/tmp/stage_2_test_set1.sh /checkout/src/ci/run.sh && \
SCRIPT=/tmp/x86_64-gnu-llvm2.sh  /checkout/src/ci/run.sh && \
SCRIPT=/tmp/x86_64-gnu-llvm3.sh  /checkout/src/ci/run.sh

@sayantn
Copy link
Contributor

sayantn commented May 15, 2025

That is extremely weird, could you mention it in the T-compiler zulip so that someone more experienced can step in

@a4lg a4lg force-pushed the check-cfg-bootstrap-1.88 branch from 2867363 to f8f0939 Compare May 26, 2025 03:35
@a4lg a4lg force-pushed the check-cfg-bootstrap-1.88 branch from f8f0939 to bc013ec Compare May 27, 2025 00:54
Since the bootstrap compiler of Rust is bumped to the commit
5dadfd5c417f0b66816cb7ca662859e2c8751fb3 (version 1.88.0-beta.3 2025-05-11),
some features should be safe to enable cfg checks.

RISC-V Features:

*   "zicsr"
*   "zicntr"
*   "zihpm"
*   "zifencei"
*   "zihintntl"
*   "zihintpause"
*   "zimop"
*   "zicboz"
*   "zicond"
*   "ztso"
*   "zfa"
*   "zca"
*   "zcb"
*   "zcmop"
*   "b"

x86 Features:

*   "amx-avx512"
*   "amx-fp8"
*   "amx-movrs"
*   "amx-tf32"
*   "amx-transpose"
@a4lg a4lg force-pushed the check-cfg-bootstrap-1.88 branch from bc013ec to 3731120 Compare May 28, 2025 03:26
@a4lg
Copy link
Contributor Author

a4lg commented May 28, 2025

@sayantn
I'll try if I can.
Anyway, I found that regular bootstrap CI (on rust-lang/rust) does not perform rustdoc using stage0 compiler (uses stage1).

@Amanieu Still, the problem I'm experiencing is not a problem of this PR itself and I believe that this is okay to merge.

@Amanieu Amanieu added this pull request to the merge queue May 30, 2025
Merged via the queue into rust-lang:master with commit b9d3dd5 May 30, 2025
62 checks passed
@a4lg a4lg deleted the check-cfg-bootstrap-1.88 branch May 31, 2025 05:12
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.

4 participants