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;
4747use syntax:: attr;
4848
4949pub 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} ;
5152
5253// The third parameter is for env vars, used on windows to set up the
5354// 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 {
218219 false
219220}
220221
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-
230222pub ( crate ) fn each_linked_rlib ( sess : & Session ,
231223 info : & CrateInfo ,
232224 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>,
9797 "rust_out" . to_string ( )
9898}
9999
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+
100113pub fn filename_for_input ( sess : & Session ,
101114 crate_type : config:: CrateType ,
102115 crate_name : & str ,
You can’t perform that action at this time.
0 commit comments