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

various download-rustc fixes #113373

Merged
merged 8 commits into from
Jul 12, 2023
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jul 5, 2023

separated out from #112143 because it keeps getting stuck in limbo.

best reviewed commit-by-commit

Previously, it would always treat download-rustc as set to false, which made bootstrap issues with
download-rustc hard to debug.
this was a pre-existing latent bug, we just didn't have any CI builders exercising it.

fixes the following errors:
```
 ---- [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt1 stdout ----

error in revision `opt1`: test compilation failed although it shouldn't!
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=i686-unknown-linux-gnu" "--cfg" "opt1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=x86_64-linux-gnu-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/auxiliary" "-Zsanitizer=address" "-Clto=thin" "-Copt-level=1"
--- stderr -------------------------------
error: linking with `x86_64-linux-gnu-gcc` failed: exit status: 1
   = note: x86_64-linux-gnu-gcc: error: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib/librustc-nightly_rt.asan.a: No such file or directory

failures:
    [ui] tests/ui/sanitize/badfree.rs
    [ui] tests/ui/sanitize/address.rs
    [ui] tests/ui/sanitize/use-after-scope.rs
    [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt0
    [ui] tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt1
```
by using `rustc-builds-alt` if download-rustc is set

this also changes the download code to use a separate build/cache/ directory and .rustc-stamp stamp file depending on whether assertions are enabled.
@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 5, 2023
@jyn514 jyn514 added the A-download-rustc Area: The `rust.download-rustc` build option. label Jul 5, 2023
@jyn514 jyn514 changed the title variouos download-rustc fixes various download-rustc fixes Jul 5, 2023
Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question.

src/bootstrap/config.rs Outdated Show resolved Hide resolved
@albertlarsan68 albertlarsan68 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2023
…-error.rs

Not only are they a pain to update, but they differ depending on whether `parallel-rustc` is enabled or not
This was not the correct fix. The problem was two-fold:
- `download-rustc` didn't respect `llvm.assertions`
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`

The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
@jyn514
Copy link
Member Author

jyn514 commented Jul 12, 2023

thanks for the review!

@bors r=albertlarsan68

@bors
Copy link
Contributor

bors commented Jul 12, 2023

📌 Commit 67b5990 has been approved by albertlarsan68

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 12, 2023
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jul 12, 2023
…ertlarsan68

various download-rustc fixes

separated out from rust-lang#112143 because it keeps getting stuck in limbo.

best reviewed commit-by-commit
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 12, 2023
…kingjubilee

Rollup of 5 pull requests

Successful merges:

 - rust-lang#113373 (various download-rustc fixes)
 - rust-lang#113385 (style-guide: Fix chain example to match rustfmt behavior)
 - rust-lang#113567 (While let suggestion will work for closure body)
 - rust-lang#113579 (Revert "fix: 🐛 etc/bash_complettion -> src/etc/... to avoid copy …)
 - rust-lang#113595 (Use constants from object crate)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dff0725 into rust-lang:master Jul 12, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 12, 2023
@jyn514 jyn514 deleted the download-rustc-fixes branch July 14, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-download-rustc Area: The `rust.download-rustc` build option. 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants