Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2120,9 +2120,11 @@ impl Compiler {
}

fn envify(s: &str) -> String {
// Converting foo-bar to FOO_BAR is a fairly idomatic mapping to an environment variable name.
// We also convert '.' to '_' to fix https://github.com/rust-lang/rust/issues/158090
s.chars()
.map(|c| match c {
'-' => '_',
'-' | '.' => '_',
c => c,
})
.flat_map(|c| c.to_uppercase())
Expand Down
Loading