File tree Expand file tree Collapse file tree 4 files changed +21
-8
lines changed
tests/run-make/resolve-rename Expand file tree Collapse file tree 4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ impl Rustc {
69
69
self
70
70
}
71
71
72
+ /// Add a suffix in each output filename.
73
+ pub fn extra_filename ( & mut self , suffix : & str ) -> & mut Self {
74
+ self . cmd . arg ( format ! ( "-Cextra-filename={suffix}" ) ) ;
75
+ self
76
+ }
77
+
72
78
/// Specify type(s) of output files to generate.
73
79
pub fn emit ( & mut self , kinds : & str ) -> & mut Self {
74
80
self . cmd . arg ( format ! ( "--emit={kinds}" ) ) ;
Original file line number Diff line number Diff line change @@ -202,7 +202,6 @@ run-make/remap-path-prefix-dwarf/Makefile
202
202
run-make/remap-path-prefix/Makefile
203
203
run-make/reproducible-build-2/Makefile
204
204
run-make/reproducible-build/Makefile
205
- run-make/resolve-rename/Makefile
206
205
run-make/return-non-c-like-enum-from-c/Makefile
207
206
run-make/return-non-c-like-enum/Makefile
208
207
run-make/rlib-chain/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // If a library is compiled with -C extra-filename, the rust compiler
2
+ // will take this into account when searching for libraries. However,
3
+ // if that library is then renamed, the rust compiler should fall back
4
+ // to its regular library location logic and not immediately fail to find
5
+ // the renamed library.
6
+ // See https://github.com/rust-lang/rust/pull/49253
7
+
8
+ use run_make_support:: { rustc, tmp_dir} ;
9
+ use std:: fs;
10
+ fn main ( ) {
11
+ rustc ( ) . extra_filename ( "-hash" ) . input ( "foo.rs" ) . run ( ) ;
12
+ rustc ( ) . input ( "bar.rs" ) . run ( ) ;
13
+ fs:: rename ( tmp_dir ( ) . join ( "libfoo-hash.rlib" ) , tmp_dir ( ) . join ( "libfoo-another-hash.rlib" ) ) ;
14
+ rustc ( ) . input ( "baz.rs" ) . run ( ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments