Skip to content

bootstrap: add bootstrap step to run intrinsic-test in CI#156356

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xonx4l:port-intrinsic-test
Jun 22, 2026
Merged

bootstrap: add bootstrap step to run intrinsic-test in CI#156356
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xonx4l:port-intrinsic-test

Conversation

@xonx4l

@xonx4l xonx4l commented May 9, 2026

Copy link
Copy Markdown
Contributor

View all comments

This PR ports library/stdarch/crates/intrinsic-test crate into the bootstrap test runner as a step, so that we can run the intrinsic-test suite via x.py test.

Changes -:
Ports intrinsic-test from the stdarch crate into the bootstrap system as a new test step so it runs inside the existing
x86_64-gnu and aarch64-gnu CI jobs .
Added intrinsic-test in src/bootstrap/src/core/build_steps/test.rs .
Registers intrinsic-test as a bootstrap tool in tool.rs .
Installs clang, lld, and Intel SDE in the respective Dockerfiles.

r? @Kobzol

try-job: x86_64-gnu

@rustbot rustbot added A-CI Area: Our Github Actions CI 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) labels May 9, 2026
@rustbot

rustbot commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label May 9, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment on lines +916 to +918
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("library/stdarch/crates/intrinsic-test")
}

@folkertdev folkertdev May 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the intrinsic tests should also run when any of the source in core_arch changes (unless I'm misinterpreting what this function does).

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No you are not misinterpreting :) . You're so right I have added the core_arch path so it triggers . Thanks for the review.

Comment on lines +27 to +30
RUN curl -L http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -o /tmp/sde.tar.xz \
&& mkdir -p /intel-sde \
&& tar -xJf /tmp/sde.tar.xz --strip-components=1 -C /intel-sde \
&& rm /tmp/sde.tar.xz

@folkertdev folkertdev May 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this doesn't need an instant fix, but we bump the version of this tool occasionally, so ideally we'd sync that version between the repositories.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, noted.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

I wonder what to do about the required dependencies. GCC/Clang is fine, but the SDE emulator seems problematic. We have a lot of CI jobs that will run the intrinsics test and I don't think it is great if we install it on all of them. Of course it is also not great if it is required when running tests locally.

I think that we should make this test be non-default for now, and run it explicitly on selected CI jobs.

View changes since this review

Comment thread src/bootstrap/src/core/build_steps/test.rs
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated

let crates_link = out_dir.join("crates");
if !crates_link.exists() {
std::os::unix::fs::symlink(builder.src.join("library/stdarch/crates"), &crates_link)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This won't work on non-Linux OSes. Why do we need this symlink?

There are existing functions in bootstrap to create symlinks, see symlink_dir.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we need symlink because the generated Cargo.toml files depend on core_arch via a relative path. We generate into the build directory to avoid writing into the submodule so that path doesn't exist there. The symlink points back at the real stdarch crates so it resolves.

Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/tool.rs Outdated
@xonx4l

xonx4l commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Thank you!

I wonder what to do about the required dependencies. GCC/Clang is fine, but the SDE emulator seems problematic. We have a lot of CI jobs that will run the intrinsics test and I don't think it is great if we install it on all of them. Of course it is also not great if it is required when running tests locally.

I think that we should make this test be non-default for now, and run it explicitly on selected CI jobs.

View changes since this review

Yes , non-default and run it explicitly on selected CI jobs is better way to handle instead on every CI jobs .

@rust-log-analyzer

This comment has been minimized.

@xonx4l xonx4l force-pushed the port-intrinsic-test branch from 9383a8f to f10bf02 Compare May 29, 2026 13:22
@Kobzol

Kobzol commented May 30, 2026

Copy link
Copy Markdown
Member

Let's run this test explicitly in the ‎x86_64-gnu CI job, as a start. The Dockerfile will need to run something like x test intrinsic-test.

@xonx4l

xonx4l commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Let's run this test explicitly in the ‎x86_64-gnu CI job, as a start. The Dockerfile will need to run something like x test intrinsic-test.

@Kobzol As I added the x86_64-gnu Dockerfile invocation you suggested and ran ./x test library/stdarch/crates/intrinsic-test locally . It failed giving this error.

warning: hidden lifetime parameters in types are deprecated
--> library/stdarch/crates/intrinsic-test/src/common/indentation.rs:20:37
|
20 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
| ----------^^^^^^^^^
| |
| expected lifetime parameter
|
= note: -W elided-lifetimes-in-paths implied by -W rust-2018-idioms
= help: to override -W rust-2018-idioms add #[allow(elided_lifetimes_in_paths)]
help: indicate the anonymous lifetime
|
20 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
| ++++

error: intrinsic-test (bin "intrinsic-test") generated 1 warning
error: warnings are denied by build.warnings configuration
Build completed unsuccessfully in 0:00:07

@Kobzol

Kobzol commented Jun 1, 2026

Copy link
Copy Markdown
Member

You can just fix the warning, the change will be later synced back to stdarch.

@rust-bors

This comment has been minimized.

@xonx4l xonx4l force-pushed the port-intrinsic-test branch from 5833cab to 0583413 Compare June 20, 2026 17:35
@rustbot

rustbot commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@xonx4l

xonx4l commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

@Kobzol reverted the accidental edit and squashed the commits . Thank you!

Comment thread src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile Outdated
@xonx4l xonx4l force-pushed the port-intrinsic-test branch from 0583413 to 9b6ab66 Compare June 21, 2026 13:33
@Kobzol

Kobzol commented Jun 21, 2026

Copy link
Copy Markdown
Member

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 21, 2026
bootstrap: add bootstrap step to run intrinsic-test in CI

try-job: x86_64-gnu
@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 79c50a0 (79c50a0aa2c9d75f3f5aedff8bd6bf2f544e4848)
Base parent: 40f92b3 (40f92b37c4f7566de7348cec4d4c2a350da598d5)

@Kobzol

Kobzol commented Jun 21, 2026

Copy link
Copy Markdown
Member

Looks like it works! Thank you! Let's try.

@bors r=kobzol,folkertdev

@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9b6ab66 has been approved by kobzol,folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 21, 2026
bootstrap: add bootstrap step to run intrinsic-test in CI



This PR ports `library/stdarch/crates/intrinsic-test` crate into the bootstrap test runner as a step, so that we can run the  intrinsic-test suite via x.py test.

Changes -:
Ports `intrinsic-test` from the stdarch crate into the bootstrap system as a new  test step so it runs inside the existing
`x86_64-gnu` and `aarch64-gnu` CI jobs .
Added `intrinsic-test` in `src/bootstrap/src/core/build_steps/test.rs` .
Registers `intrinsic-test` as a bootstrap tool  in `tool.rs` .
Installs `clang`, `lld`, and Intel SDE in the respective Dockerfiles.

r? @Kobzol

try-job: x86_64-gnu
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 21, 2026
@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5697a1f failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: aarch64-gnu-debug
##[endgroup]
    Updating crates.io index
error: failed to get `adler2` as a dependency of package `miniz_oxide v0.8.8`
    ... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
    ... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `adler2`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of ad/le/adler2 failed

Caused by:
  curl failed

Caused by:

@Kobzol

Kobzol commented Jun 21, 2026

Copy link
Copy Markdown
Member

@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 21, 2026
…ol,folkertdev

bootstrap: add bootstrap step to run intrinsic-test in CI

This PR ports `library/stdarch/crates/intrinsic-test` crate into the bootstrap test runner as a step, so that we can run the  intrinsic-test suite via x.py test.

Changes -:
Ports `intrinsic-test` from the stdarch crate into the bootstrap system as a new  test step so it runs inside the existing
`x86_64-gnu` and `aarch64-gnu` CI jobs .
Added `intrinsic-test` in `src/bootstrap/src/core/build_steps/test.rs` .
Registers `intrinsic-test` as a bootstrap tool  in `tool.rs` .
Installs `clang`, `lld`, and Intel SDE in the respective Dockerfiles.

r? @Kobzol

try-job: x86_64-gnu
rust-bors Bot pushed a commit that referenced this pull request Jun 21, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #156356 (bootstrap: add bootstrap step to run intrinsic-test in CI)
 - #157711 (Move proc-macro dlopen from proc-macro-srv to rustc_metadata)
 - #157836 (rebuild LLVM when `bootstrap.toml` config changes)
 - #158214 (Don't try to remove assignments in SimplifyComparisonIntegral)
 - #158226 (miri subtree update)
 - #158108 (Update actions/download-artifact action to v8.0.1)
 - #158150 (Update backtrace submodule to pick up AIX related fixes.)
 - #158178 (Use the target checking infrastructure for the diagnostic attributes)
 - #158195 (Add me to some rotation groups)
@rust-bors rust-bors Bot merged commit f8f1189 into rust-lang:main Jun 22, 2026
14 of 15 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 22, 2026
rust-timer added a commit that referenced this pull request Jun 22, 2026
Rollup merge of #156356 - xonx4l:port-intrinsic-test, r=kobzol,folkertdev

bootstrap: add bootstrap step to run intrinsic-test in CI

This PR ports `library/stdarch/crates/intrinsic-test` crate into the bootstrap test runner as a step, so that we can run the  intrinsic-test suite via x.py test.

Changes -:
Ports `intrinsic-test` from the stdarch crate into the bootstrap system as a new  test step so it runs inside the existing
`x86_64-gnu` and `aarch64-gnu` CI jobs .
Added `intrinsic-test` in `src/bootstrap/src/core/build_steps/test.rs` .
Registers `intrinsic-test` as a bootstrap tool  in `tool.rs` .
Installs `clang`, `lld`, and Intel SDE in the respective Dockerfiles.

r? @Kobzol

try-job: x86_64-gnu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants