about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-07-17 01:06:56 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-07-17 01:09:52 +0200
commit2ff13d9cf1e7ce7fccf6f535c94b4c513fd2389f (patch)
treeac2996c396d266c4588a5d1660d55a5d66700016
parent7e11379f3b4c376fbb9a6c4d44f3286ccc28d149 (diff)
downloadrust-2ff13d9cf1e7ce7fccf6f535c94b4c513fd2389f.tar.gz
rust-2ff13d9cf1e7ce7fccf6f535c94b4c513fd2389f.zip
Use an UTF-8 locale for the linker.
-rw-r--r--src/librustc_codegen_ssa/back/linker.rs4
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");
 }