-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-run-makeArea: port run-make Makefiles to rmake.rsArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Current bootstrap cargo incantations are nothing short of magic and are indecipherable. We should try to refactor them to proper Command
wrappers.
let bootstrap_cargo = env_var("BOOTSTRAP_CARGO");
let mut cmd = cmd(bootstrap_cargo);
cmd.args(&[
"build",
"--manifest-path",
manifest_path.to_str().unwrap(),
"-Zbuild-std=core",
"--target",
&target,
])
.env("PATH", path)
.env("RUSTC", rustc)
...
Metadata
Metadata
Assignees
Labels
A-run-makeArea: port run-make Makefiles to rmake.rsArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
thumb-none-cortex-m
to rmake #128636lolbinarycat commentedon Aug 22, 2024
@rustbot claim
lolbinarycat commentedon Aug 22, 2024
any idea why these are explicitly inheriting environment variables? it's not like they call env_clear or anything...
jieyouxu commentedon Sep 29, 2024
Sorry I didn't notice this issue, it's because at the time when I wrote run-make infra I just copied whatever the previous Makefile implementation did: it simply passed the already-available bootstrap cargo to run-make tests.
As discovered during a beta backport we found out that run-make
-Z build-std
tests fail oncompiler_builtins
on older branches #130634 because we added some newCargo.lock
setup that the bootstrap cargo did not know how to handle, but which is present in a cargo that is built from sources by a stage1 rustc.This particular issue is fixed by a combination of #130642 and #130739 where we properly ensuring a suitably-staged cargo in bootstrap is available, and passing a path to that cargo in compiletest (see #130739 for details). We removed any
BOOTSTRAP_CARGO
in the test suite, run-make-support and compiletest.