File tree 4 files changed +21
-8
lines changed
tests/run-make/resolve-rename
4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ impl Rustc {
70
70
self
71
71
}
72
72
73
+ /// Add a suffix in each output filename.
74
+ pub fn extra_filename ( & mut self , suffix : & str ) -> & mut Self {
75
+ self . cmd . arg ( format ! ( "-Cextra-filename={suffix}" ) ) ;
76
+ self
77
+ }
78
+
73
79
/// Specify type(s) of output files to generate.
74
80
pub fn emit ( & mut self , kinds : & str ) -> & mut Self {
75
81
self . cmd . arg ( format ! ( "--emit={kinds}" ) ) ;
Original file line number Diff line number Diff line change @@ -216,7 +216,6 @@ run-make/remap-path-prefix-dwarf/Makefile
216
216
run-make/remap-path-prefix/Makefile
217
217
run-make/reproducible-build-2/Makefile
218
218
run-make/reproducible-build/Makefile
219
- run-make/resolve-rename/Makefile
220
219
run-make/return-non-c-like-enum-from-c/Makefile
221
220
run-make/return-non-c-like-enum/Makefile
222
221
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