Skip to content

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Sep 4, 2025

Recent advancements in bootstrapping technology have allowed us to get rid of RustcLink, and thus automatic copying of rustc rlibs into the sysroot of the build compiler, which was "polluting it". This PR adds the same approach used for rmeta artifacts, where we store the artifacts in a separate directory, and then pass them using -L when compiling tools that actually need the rlib artifacts.

As usually, download-ci-rustc is special, but it should work, somehow, for now.

The PR is not done yet, we will actually have to copy the artifacts into the build compiler sysroot when doing dist of rustc-dev. Opening it to see what CI says.

@rustbot rustbot added A-bootstrap-stamp Area: bootstrap stamp logic A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 4, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:75:14
   2: core::panicking::panic_display
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:268:5
   3: core::option::expect_failed
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:2139:5
   4: <core::option::Option<bootstrap::utils::build_stamp::BuildStamp>>::expect
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:964:21
   5: <bootstrap::core::build_steps::compile::Rustc as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/compile.rs:1086:18
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::compile::Rustc>
             at ./src/core/builder/mod.rs:1782:36
   7: <bootstrap::core::build_steps::compile::Assemble as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/compile.rs:2126:21
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::compile::Assemble>
             at ./src/core/builder/mod.rs:1782:36
   9: <bootstrap::core::builder::Builder>::compiler
             at ./src/core/builder/mod.rs:1360:14
  10: <bootstrap::core::build_steps::compile::Assemble as bootstrap::core::builder::Step>::make_run
             at ./src/core/build_steps/compile.rs:1922:42
  11: <bootstrap::core::builder::StepDescription>::maybe_run
             at ./src/core/builder/mod.rs:532:13
  12: <bootstrap::core::builder::StepDescription>::run
             at ./src/core/builder/mod.rs:664:22
  13: <bootstrap::core::builder::Builder>::run_step_descriptions
             at ./src/core/builder/mod.rs:1333:9
  14: <bootstrap::utils::tests::ConfigBuilder>::run
             at ./src/core/builder/tests.rs:2920:17
  15: <bootstrap::utils::tests::ConfigBuilder>::get_steps
             at ./src/core/builder/tests.rs:2925:26
  16: <bootstrap::utils::tests::ConfigBuilder>::render_steps
             at ./src/core/builder/tests.rs:2930:14
  17: bootstrap::core::builder::tests::snapshot::build_compiler_stage_3
             at ./src/core/builder/tests.rs:657:18
  18: bootstrap::core::builder::tests::snapshot::build_compiler_stage_3::{closure#0}
             at ./src/core/builder/tests.rs:651:32
  19: <bootstrap::core::builder::tests::snapshot::build_compiler_stage_3::{closure#0} as core::ops::function::FnOnce<()>>::call_once
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/ops/function.rs:253:5
  20: core::ops::function::FnOnce::call_once
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/ops/function.rs:253:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- core::builder::tests::snapshot::build_compiler_stage_3 stdout end ----
---- core::builder::tests::snapshot::test_all_stage_2 stdout ----
Running test in /tmp/.tmpOaqu2G
##[group]Building stage1 tidy (stage0 -> stage1, aarch64-unknown-linux-gnu)
##[endgroup]
fmt check
tidy check
x.py completions check
---
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:75:14
   2: core::panicking::panic_display
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:268:5
   3: core::option::expect_failed
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:2139:5
   4: <core::option::Option<bootstrap::utils::build_stamp::BuildStamp>>::expect
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:964:21
   5: <bootstrap::core::build_steps::compile::Rustc as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/compile.rs:1086:18
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::compile::Rustc>
             at ./src/core/builder/mod.rs:1782:36
   7: <bootstrap::core::build_steps::test::Compiletest as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/test.rs:1767:21
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Compiletest>
             at ./src/core/builder/mod.rs:1782:36
   9: <bootstrap::core::build_steps::test::UiFullDeps as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/test.rs:1434:25
  10: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::UiFullDeps>
             at ./src/core/builder/mod.rs:1782:36
  11: <bootstrap::core::build_steps::test::UiFullDeps as bootstrap::core::builder::Step>::make_run
             at ./src/core/build_steps/test.rs:1430:29
  12: <bootstrap::core::builder::StepDescription>::maybe_run
             at ./src/core/builder/mod.rs:532:13
  13: <bootstrap::core::builder::StepDescription>::run
             at ./src/core/builder/mod.rs:584:26
  14: <bootstrap::core::builder::Builder>::run_step_descriptions
             at ./src/core/builder/mod.rs:1333:9
  15: <bootstrap::utils::tests::ConfigBuilder>::run
             at ./src/core/builder/tests.rs:2920:17
  16: <bootstrap::utils::tests::ConfigBuilder>::get_steps
             at ./src/core/builder/tests.rs:2925:26
  17: <bootstrap::utils::tests::ConfigBuilder>::render_steps
             at ./src/core/builder/tests.rs:2930:14
  18: bootstrap::core::builder::tests::snapshot::test_all_stage_2
             at ./src/core/builder/tests.rs:2204:18
  19: bootstrap::core::builder::tests::snapshot::test_all_stage_2::{closure#0}
             at ./src/core/builder/tests.rs:2199:26
  20: <bootstrap::core::builder::tests::snapshot::test_all_stage_2::{closure#0} as core::ops::function::FnOnce<()>>::call_once
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/ops/function.rs:253:5
  21: core::ops::function::FnOnce::call_once
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/ops/function.rs:253:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- core::builder::tests::snapshot::test_all_stage_2 stdout end ----
---- core::builder::tests::snapshot::test_compiletest_suites_stage2 stdout ----
Running test in /tmp/.tmp51K7Ah
##[group]Building LLVM for aarch64-unknown-linux-gnu
##[endgroup]
##[group]Building stage1 compiler artifacts (stage0 -> stage1, aarch64-unknown-linux-gnu)
---
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:75:14
   2: core::panicking::panic_display
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/panicking.rs:268:5
   3: core::option::expect_failed
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:2139:5
   4: <core::option::Option<bootstrap::utils::build_stamp::BuildStamp>>::expect
             at /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/option.rs:964:21
   5: <bootstrap::core::build_steps::compile::Rustc as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/compile.rs:1086:18
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::compile::Rustc>
             at ./src/core/builder/mod.rs:1782:36
   7: <bootstrap::core::build_steps::test::Compiletest as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/test.rs:1767:21
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Compiletest>
             at ./src/core/builder/mod.rs:1782:36
   9: <bootstrap::core::build_steps::test::UiFullDeps as bootstrap::core::builder::Step>::run
             at ./src/core/build_steps/test.rs:1434:25
  10: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::UiFullDeps>
             at ./src/core/builder/mod.rs:1782:36
  11: <bootstrap::core::build_steps::test::UiFullDeps as bootstrap::core::builder::Step>::make_run
             at ./src/core/build_steps/test.rs:1430:29
  12: <bootstrap::core::builder::StepDescription>::maybe_run
             at ./src/core/builder/mod.rs:532:13
  13: <bootstrap::core::builder::StepDescription>::run
             at ./src/core/builder/mod.rs:664:22
  14: <bootstrap::core::builder::Builder>::run_step_descriptions
             at ./src/core/builder/mod.rs:1333:9
  15: <bootstrap::utils::tests::ConfigBuilder>::run
             at ./src/core/builder/tests.rs:2920:17
  16: <bootstrap::utils::tests::ConfigBuilder>::get_steps
             at ./src/core/builder/tests.rs:2925:26
  17: <bootstrap::utils::tests::ConfigBuilder>::render_steps
             at ./src/core/builder/tests.rs:2930:14
  18: bootstrap::core::builder::tests::snapshot::test_compiletest_suites_stage2
             at ./src/core/builder/tests.rs:2139:18
  19: bootstrap::core::builder::tests::snapshot::test_compiletest_suites_stage2::{closure#0}
             at ./src/core/builder/tests.rs:2133:40
  20: <bootstrap::core::builder::tests::snapshot::test_compiletest_suites_stage2::{closure#0} as core::ops::function::FnOnce<()>>::call_once

@bors
Copy link
Collaborator

bors commented Sep 6, 2025

☔ The latest upstream changes (presumably #146253) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bootstrap-stamp Area: bootstrap stamp logic A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants