File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1950,6 +1950,19 @@ impl Build {
1950
1950
cmd. push_cc_arg ( warnings_to_errors_flag) ;
1951
1951
}
1952
1952
1953
+ // Copied from <https://github.com/rust-lang/rust/blob/5db81020006d2920fc9c62ffc0f4322f90bffa04/compiler/rustc_codegen_ssa/src/back/linker.rs#L27-L38>
1954
+ //
1955
+ // Disables non-English messages from localized linkers.
1956
+ // Such messages may cause issues with text encoding on Windows
1957
+ // and prevent inspection of msvc output in case of errors, which we occasionally do.
1958
+ // This should be acceptable because other messages from rustc are in English anyway,
1959
+ // and may also be desirable to improve searchability of the compiler diagnostics.
1960
+ if matches ! ( cmd. family, ToolFamily :: Msvc { clang_cl: false } ) {
1961
+ cmd. env . push ( ( "VSLANG" . into ( ) , "1033" . into ( ) ) ) ;
1962
+ } else {
1963
+ cmd. env . push ( ( "LC_ALL" . into ( ) , "C" . into ( ) ) ) ;
1964
+ }
1965
+
1953
1966
Ok ( cmd)
1954
1967
}
1955
1968
You can’t perform that action at this time.
0 commit comments