diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-17 14:09:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-17 14:09:24 -0700 |
| commit | eef22dae7e0ccbf484f1fef3989759fc75b6dddb (patch) | |
| tree | 87cf6dee908f3f22365b0372c6decbb8c8580984 /src | |
| parent | 87d01d11e17e497b3ec43559cbeee3ad704603ee (diff) | |
| parent | 2ff13d9cf1e7ce7fccf6f535c94b4c513fd2389f (diff) | |
| download | rust-eef22dae7e0ccbf484f1fef3989759fc75b6dddb.tar.gz rust-eef22dae7e0ccbf484f1fef3989759fc75b6dddb.zip | |
Rollup merge of #74416 - NieDzejkob:linker-locale-utf8, r=oli-obk
Use an UTF-8 locale for the linker. Using a `C` locale breaks unicode filenames on Guix, where the linker is wrapped by a Guile program.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_codegen_ssa/back/linker.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs index e64aafa599f..6f40aac83eb 100644 --- a/src/librustc_codegen_ssa/back/linker.rs +++ b/src/librustc_codegen_ssa/back/linker.rs @@ -28,7 +28,9 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor}; pub fn disable_localization(linker: &mut Command) { // No harm in setting both env vars simultaneously. // Unix-style linkers. - linker.env("LC_ALL", "C"); + // We use an UTF-8 locale, as the generic C locale disables support for non-ASCII + // bytes in filenames on some platforms. + linker.env("LC_ALL", "en_US.UTF-8"); // MSVC's `link.exe`. linker.env("VSLANG", "1033"); } |
