File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
librustc_codegen_llvm/back Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ use std::str;
47
47
use syntax:: attr;
48
48
49
49
pub use rustc_codegen_utils:: link:: { find_crate_name, filename_for_input, default_output_for_target,
50
- invalid_output_for_target, out_filename, check_file_is_writeable} ;
50
+ invalid_output_for_target, out_filename, check_file_is_writeable,
51
+ filename_for_metadata} ;
51
52
52
53
// The third parameter is for env vars, used on windows to set up the
53
54
// path for MSVC to find its DLLs, and gcc to find its bundled
@@ -218,15 +219,6 @@ fn preserve_objects_for_their_debuginfo(sess: &Session) -> bool {
218
219
false
219
220
}
220
221
221
- fn filename_for_metadata ( sess : & Session , crate_name : & str , outputs : & OutputFilenames ) -> PathBuf {
222
- let out_filename = outputs. single_output_file . clone ( )
223
- . unwrap_or ( outputs
224
- . out_directory
225
- . join ( & format ! ( "lib{}{}.rmeta" , crate_name, sess. opts. cg. extra_filename) ) ) ;
226
- check_file_is_writeable ( & out_filename, sess) ;
227
- out_filename
228
- }
229
-
230
222
pub ( crate ) fn each_linked_rlib ( sess : & Session ,
231
223
info : & CrateInfo ,
232
224
f : & mut dyn FnMut ( CrateNum , & Path ) ) -> Result < ( ) , String > {
Original file line number Diff line number Diff line change @@ -97,6 +97,19 @@ pub fn find_crate_name(sess: Option<&Session>,
97
97
"rust_out" . to_string ( )
98
98
}
99
99
100
+ pub fn filename_for_metadata ( sess : & Session ,
101
+ crate_name : & str ,
102
+ outputs : & OutputFilenames ) -> PathBuf {
103
+ let libname = format ! ( "{}{}" , crate_name, sess. opts. cg. extra_filename) ;
104
+
105
+ let out_filename = outputs. single_output_file . clone ( )
106
+ . unwrap_or ( outputs. out_directory . join ( & format ! ( "lib{}.rmeta" , libname) ) ) ;
107
+
108
+ check_file_is_writeable ( & out_filename, sess) ;
109
+
110
+ out_filename
111
+ }
112
+
100
113
pub fn filename_for_input ( sess : & Session ,
101
114
crate_type : config:: CrateType ,
102
115
crate_name : & str ,
You can’t perform that action at this time.
0 commit comments