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

bootstrap: fully rely on RUSTC_WRAPPER #127682

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 13, 2024

With rust-lang/cargo#13659, cargo now respects RUSTC_WRAPPER for all rustc invocations. That means we can finally remove the hack where we set our wrapper as both RUSTC and RUSTC_WRAPPER.

There could still be build scripts that fail to respect RUSTC_WRAPPER, but then we should fix those before they become a rustc dependency.

Fixes #128383

@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2024

r? @Kobzol

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

@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 Jul 13, 2024
@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 13, 2024

Turns out even our own libc crate doesn't properly wrap its rustc invocations.^^ I guess I did not hit this locally as the build script was already cached.
Blocked on rust-lang/libc#3772.

@Kobzol
Copy link
Contributor

Kobzol commented Jul 13, 2024

@rustbot blocked

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 13, 2024
@RalfJung

This comment was marked as outdated.

@RalfJung RalfJung closed this Jul 30, 2024
@RalfJung RalfJung deleted the bootstrap-rustc-wrapper branch July 30, 2024 10:26
@RalfJung RalfJung restored the bootstrap-rustc-wrapper branch August 28, 2024 10:10
@RalfJung RalfJung reopened this Aug 28, 2024
@RalfJung
Copy link
Member Author

Locally a check-build passes now, let's see what CI says...

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

I guess I still had cached build script results somewhere.

The next offender is: field-offset. It uses rustc_version, so hopefully we just need to pull in the just-released version 0.4.1.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.731 Building wheels for collected packages: reuse
#16 2.732   Building wheel for reuse (pyproject.toml): started
#16 2.979   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 2.980   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 2.980   Stored in directory: /tmp/pip-ephem-wheel-cache-222mtqlt/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 2.983 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.375 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.375 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.5s
---

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/release/build/protobuf-36e7809420578a1e/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/protobuf-3.2.0/build.rs:28:10:
  spawn rustc: Os { code: 2, kind: NotFound, message: "No such file or directory" }
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:04:01
  local time: Wed Aug 28 12:02:42 UTC 2024
  network time: Wed, 28 Aug 2024 12:02:42 GMT

@RalfJung
Copy link
Member Author

Blocked on stepancheg/rust-protobuf#735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. 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.

bootstrap should be able to fully rely on RUSTC_WRAPPER
4 participants