Skip to content

Improve handing of env vars during bootstrap process - #101783

Merged
bors merged 1 commit into
rust-lang:masterfrom
chriswailes:env-vars
Sep 17, 2022
Merged

Improve handing of env vars during bootstrap process#101783
bors merged 1 commit into
rust-lang:masterfrom
chriswailes:env-vars

Conversation

@chriswailes

Copy link
Copy Markdown
Contributor

This CL modifies the handing of env vars during the bootstrap process in two ways:

  1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
  2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo

@rustbotrustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 13, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2022

@jyn514jyn514 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. The python changes make sense to me but need changes to the implementation, I left comments inline. It would be helpful to know when you need to set these variables, I'm surprised no one has complained before.

The rust changes I'm unsure about , I left a comment inline.

Comment threadsrc/bootstrap/bootstrap.py Outdated
Comment threadsrc/bootstrap/bootstrap.py Outdated
Comment threadsrc/bootstrap/bootstrap.py Outdated
Comment threadsrc/bootstrap/builder.rs Outdated
@jyn514jyn514 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 Sep 14, 2022
@chriswailes

Copy link
Copy Markdown
ContributorAuthor

It would be helpful to know when you need to set these variables, I'm surprised no one has complained before.

We ran into this issue when the lzma-sys crate's build.rs file found the default system cc on an Ubuntu 14.04 image, which was too old to successfully compile the crate's C (or assembly, I can't remember) files.

@chriswailes

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 14, 2022
@jyn514

Copy link
Copy Markdown
Member

@chriswailes you force pushed but I don't see any changes; maybe you forgot to commit them?

@chriswailes

Copy link
Copy Markdown
ContributorAuthor

@jyn514 Yup, and then I had to pull, rebase, re-compile... A full yak shave. Sorry about that.

@jyn514jyn514 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r=me with the last nit fixed. Thanks!

Comment threadsrc/bootstrap/bootstrap.py Outdated
@jyn514

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 14, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 8df181d has been approved by jyn514

It is now in the queue for this repository.

@borsbors 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 Sep 14, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 15, 2022
Improve handing of env vars during bootstrap process
This CL modifies the handing of env vars during the bootstrap process in two ways:
1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo
@Dylan-DPCDylan-DPC mentioned this pull request Sep 15, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 15, 2022
Improve handing of env vars during bootstrap process
This CL modifies the handing of env vars during the bootstrap process in two ways:
1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo
@Dylan-DPCDylan-DPC mentioned this pull request Sep 15, 2022
@Dylan-DPC

Copy link
Copy Markdown
Member

@bors r-

failed in rollup

@borsbors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 15, 2022
Comment threadsrc/bootstrap/bootstrap.py Outdated
This CL modifies the handing of env vars during the bootstrap process in
two ways:
1. Replaces '-' characters with '_' characters in target names to
increase compatibility with different shells
2. Passes Stage0 snapshot compiler related env vars to early invocations
of Cargo
@jyn514

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 16, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit d1291dc has been approved by jyn514

It is now in the queue for this repository.

@borsbors 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 Sep 16, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 17, 2022
Improve handing of env vars during bootstrap process
This CL modifies the handing of env vars during the bootstrap process in two ways:
1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo
This was referenced Sep 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2022
…iaskrgr
Rollup of 9 pull requests
Successful merges:
- rust-lang#101672 (array docs - advertise how to get array from slice)
- rust-lang#101781 (Extend list of targets that support dyanmic linking for llvm tools)
- rust-lang#101783 (Improve handing of env vars during bootstrap process)
- rust-lang#101801 (add note for `layout_of` when query depth overflows)
- rust-lang#101824 (rustdoc: add test cases for turning ``[Vec<T>]`` into ``[`Vec<T>`]``)
- rust-lang#101861 (Update stdarch)
- rust-lang#101873 (Allow building `rust-analyzer-proc-macro-srv` as a standalone tool)
- rust-lang#101918 (rustdoc: clean up CSS for All Items and All Crates lists)
- rust-lang#101934 (Continue migration of CSS themes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 9c32773 into rust-lang:masterSep 17, 2022
@rustbotrustbot added this to the 1.65.0 milestone Sep 17, 2022
@chriswailes
chriswailes deleted the env-vars branch September 19, 2022 17:07
@cuvipercuviper modified the milestones: 1.65.0, 1.66.0Oct 4, 2022
chriswailes added a commit to chriswailes/rust that referenced this pull request Feb 3, 2023
In rust-lang#101783 I accidentally removed
a load-bearing linker argument. This PR adds it back in.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2023
…an68
Add a linker argument back to boostrap.py
In rust-lang#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
bors added a commit to rust-lang/miri that referenced this pull request Feb 7, 2023
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request Jan 27, 2026
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request Jan 27, 2026
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
Add a linker argument back to boostrap.py
In rust-lang/rust#101783 I accidentally removed a load-bearing linker argument. This PR adds it back in.
r? jyn514
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant 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.

7 participants

@chriswailes@rust-highfive@jyn514@bors@Dylan-DPC@cuviper@rustbot