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

improve the way bootstrap handles rustlib components #127188

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

onur-ozkan
Copy link
Member

When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as they run on read-only mode.

This change fixes the problem by copying rustc-src from the CI rustc sysroot and only symlinking rustc-src from the rust source when download-rustc is not enabled.

r? @Kobzol (we talked about this already on Zulip, he knows the context)

Blocker for #122709

@rustbot rustbot added 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 Jun 30, 2024
@onur-ozkan onur-ozkan force-pushed the rustc-src-fix branch 2 times, most recently from ee92e6b to 9390a10 Compare June 30, 2024 21:16
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Looks good, left one nit.

src/bootstrap/src/core/build_steps/compile.rs Show resolved Hide resolved
@onur-ozkan onur-ozkan force-pushed the rustc-src-fix branch 2 times, most recently from bf243ea to 1358c50 Compare July 1, 2024 08:47
@rust-log-analyzer

This comment has been minimized.

When CI rustc is enabled, bootstrap tries to symlink the rust source (project root)
into target sysroot right before copying it from the CI rustc's sysroot. This becomes
a problem in CI builders (which we currently don't see because they don't use CI rustc)
because the copying part will fail as they run on read-only mode.

This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking
`rustc-src` from the rust source when download-rustc is not enabled.

Signed-off-by: onur-ozkan <[email protected]>
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
Copy link
Member Author

@bors r=Kobzol

@bors
Copy link
Contributor

bors commented Jul 1, 2024

📌 Commit 97415ce has been approved by Kobzol

It is now in the queue for this repository.

@bors bors 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 Jul 1, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 1, 2024
 improve the way bootstrap handles rustlib components

When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as [they run on read-only mode](https://github.com/rust-lang/rust/blob/ef3d6fd7002500af0a985f70d3ac5152623c1396/src/ci/docker/run.sh#L233).

This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking `rustc-src` from the rust source when download-rustc is not enabled.

r? `@Kobzol` (we talked about this already on Zulip, he knows the context)

Blocker for rust-lang#122709
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#126753 (Add nightly style guide section for `precise_capturing` `use<>` syntax)
 - rust-lang#126880 (Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake`)
 - rust-lang#126941 (Migrate `run-make/llvm-ident` to `rmake.rs`)
 - rust-lang#127128 (Stabilize `duration_abs_diff`)
 - rust-lang#127129 (Use full expr span for return suggestion on type error/ambiguity)
 - rust-lang#127188 ( improve the way bootstrap handles rustlib components)
 - rust-lang#127201 (Improve run-make-support API)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2024
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#126732 (Stabilize `PanicInfo::message()` and `PanicMessage`)
 - rust-lang#126753 (Add nightly style guide section for `precise_capturing` `use<>` syntax)
 - rust-lang#126832 (linker: Refactor interface for passing arguments to linker)
 - rust-lang#126880 (Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake`)
 - rust-lang#127128 (Stabilize `duration_abs_diff`)
 - rust-lang#127129 (Use full expr span for return suggestion on type error/ambiguity)
 - rust-lang#127188 ( improve the way bootstrap handles rustlib components)
 - rust-lang#127201 (Improve run-make-support API)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cb81d0d into rust-lang:master Jul 1, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 1, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2024
Rollup merge of rust-lang#127188 - onur-ozkan:rustc-src-fix, r=Kobzol

 improve the way bootstrap handles rustlib components

When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as [they run on read-only mode](https://github.com/rust-lang/rust/blob/ef3d6fd7002500af0a985f70d3ac5152623c1396/src/ci/docker/run.sh#L233).

This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking `rustc-src` from the rust source when download-rustc is not enabled.

r? ``@Kobzol`` (we talked about this already on Zulip, he knows the context)

Blocker for rust-lang#122709
@onur-ozkan onur-ozkan deleted the rustc-src-fix branch July 2, 2024 05:32
onur-ozkan added a commit to onur-ozkan/rust that referenced this pull request Aug 20, 2024
Since rust-lang#127188, copying files from `.rustc-dev-contents`
regressed rust-lang#108767 again. Since `rustc-src` is already
included in the CI rustc sysroot, we don't need to copy these files to have `rustc-src` component.

Signed-off-by: onur-ozkan <[email protected]>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 3, 2024
…, r=Kobzol

don't copy `.rustc-dev-contents` from CI rustc

Since rust-lang#127188, copying files from `.rustc-dev-contents` regressed rust-lang#108767 again. Since `rustc-src` is already included in the CI rustc sysroot, we don't need to copy these files to have `rustc-src` component.

Blocker for rust-lang#122709
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 3, 2024
Rollup merge of rust-lang#129311 - onur-ozkan:multiple-candidates-fix, r=Kobzol

don't copy `.rustc-dev-contents` from CI rustc

Since rust-lang#127188, copying files from `.rustc-dev-contents` regressed rust-lang#108767 again. Since `rustc-src` is already included in the CI rustc sysroot, we don't need to copy these files to have `rustc-src` component.

Blocker for rust-lang#122709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants