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

Fix rustc-args passing issue in bootstrap #113948

Merged
merged 1 commit into from Jul 22, 2023

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Jul 22, 2023

Fixes #113178, r? @jyn514

@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 22, 2023
@lqd
Copy link
Member

lqd commented Jul 22, 2023

https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/vacation/near/376793983

r? bootstrap

@rustbot rustbot assigned clubby789 and unassigned jyn514 Jul 22, 2023
@clubby789
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 22, 2023

📌 Commit c0156f1 has been approved by clubby789

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 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 22, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#112508 (Tweak spans for self arg, fix borrow suggestion for signature mismatch)
 - rust-lang#113901 (Get rid of subst-relate incompleteness in new solver)
 - rust-lang#113948 (Fix rustc-args passing issue in bootstrap)
 - rust-lang#113950 (Remove Scope::Elision from bound-vars resolution.)
 - rust-lang#113957 (Add regression test for issue rust-lang#113941 - naive layout isn't refined)
 - rust-lang#113959 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3c83eab into rust-lang:master Jul 22, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 22, 2023
self.config.cmd.rustc_args().iter().map(|s| s.to_string()).collect::<Vec<_>>();
if !rustc_args.is_empty() {
cargo.env("RUSTFLAGS", &rustc_args.join(" "));
}
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this patch, it doesn't make sense to me. This is setting the RUSTFLAGS env var, but when this Cargo instance is later turned into a Command, the RUSTFLAGS env var is anyway overwritten again:

fn from(mut cargo: Cargo) -> Command {
let rustflags = &cargo.rustflags.0;
if !rustflags.is_empty() {
cargo.command.env("RUSTFLAGS", rustflags);
}

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be added to rustflags instead?

Copy link
Member

Choose a reason for hiding this comment

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

Also the --help text says this should only be passed when running tests; I don't see that reflected in the code.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this isn't correct and fixed in #123489.

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.

bootstrap: rustc-args is only passed to compiletest, not unit tests
8 participants