Skip to content

Improve the semantics of Build::env#1682

Merged
NobodyXu merged 6 commits intomainfrom
fix-env-stuff
Mar 12, 2026
Merged

Improve the semantics of Build::env#1682
NobodyXu merged 6 commits intomainfrom
fix-env-stuff

Conversation

@madsmtm
Copy link
Copy Markdown
Contributor

@madsmtm madsmtm commented Feb 27, 2026

Follow-up to #1656.

This implements what I proposed in there, primarily:

See each commit for details (I can split it up into several PRs if you prefer?)

madsmtm added 3 commits March 8, 2026 16:21
Such that it's also tracked by Cargo.
Into:
- `cargo_env_var_os`
- `Build::get_env`
- `Build::get_env_overridable`
The following methods should also be affected by `Build::env`:
- `Build::[try_]get_compiler`
- `Build::[try_]get_archiver`
- `Build::[try_]get_ranlib`
@madsmtm madsmtm force-pushed the fix-env-stuff branch 2 times, most recently from c22947c to d9e4c8e Compare March 8, 2026 15:28
@madsmtm madsmtm requested a review from NobodyXu March 8, 2026 16:33
Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs
Co-authored-by: Jiahao XU <[email protected]>
Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Can we have a doc on all env vars that can be overridden please?

@madsmtm
Copy link
Copy Markdown
Contributor Author

madsmtm commented Mar 11, 2026

Done now, I also opened #1688 to track further extensions to this.

@madsmtm madsmtm requested a review from NobodyXu March 11, 2026 16:00
Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thank you!

@NobodyXu NobodyXu merged commit 1654cb9 into main Mar 12, 2026
79 checks passed
@NobodyXu NobodyXu deleted the fix-env-stuff branch March 12, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants