Skip to content

Commit 0b54782

Browse files
committed
Don't translate --print native-static-libs output
This breaks tools that depend on the prefix
1 parent 6a20f7d commit 0b54782

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,8 @@ fn print_native_static_libs(sess: &Session, all_native_libs: &[NativeLib]) {
13541354
if !lib_args.is_empty() {
13551355
sess.emit_note(errors::StaticLibraryNativeArtifacts);
13561356
// Prefix for greppability
1357-
sess.emit_note(errors::NativeStaticLibs { arguments: lib_args.join(" ") });
1357+
// Note: This must not be translated as tools are allowed to depend on this exact string.
1358+
sess.note_without_error(&format!("native-static-libs: {}", &lib_args.join(" ")));
13581359
}
13591360
}
13601361

compiler/rustc_codegen_ssa/src/errors.rs

-6
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,6 @@ pub struct LinkerFileStem;
444444
#[diag(codegen_ssa_static_library_native_artifacts)]
445445
pub struct StaticLibraryNativeArtifacts;
446446

447-
#[derive(Diagnostic)]
448-
#[diag(codegen_ssa_native_static_libs)]
449-
pub struct NativeStaticLibs {
450-
pub arguments: String,
451-
}
452-
453447
#[derive(Diagnostic)]
454448
#[diag(codegen_ssa_link_script_unavailable)]
455449
pub struct LinkScriptUnavailable;

compiler/rustc_error_messages/locales/en-US/codegen_ssa.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ codegen_ssa_linker_file_stem = couldn't extract file stem from specified linker
157157
158158
codegen_ssa_static_library_native_artifacts = Link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms.
159159
160-
codegen_ssa_native_static_libs = native-static-libs: {$arguments}
161-
162160
codegen_ssa_link_script_unavailable = can only use link script when linking with GNU-like linker
163161
164162
codegen_ssa_link_script_write_failure = failed to write link script to {$path}: {$error}

0 commit comments

Comments
 (0)