Fix bug in library output filename construction: /tmp/foo.rc was being linked as lib/tmp/foo-<hash>-<vers>.so not /tmp/foo-<hash>-<vers>.so
This commit is contained in:
parent
1753607f6a
commit
7694689044
2 changed files with 11 additions and 1 deletions
|
|
@ -588,9 +588,16 @@ fn link_binary(sess: session::session,
|
|||
let long_libname =
|
||||
std::os::dylib_filename(#fmt("%s-%s-%s",
|
||||
lm.name, lm.extras_hash, lm.vers));
|
||||
log "link_meta.name: " + lm.name;
|
||||
log "long_libname: " + long_libname;
|
||||
log "out_filename: " + out_filename;
|
||||
log "dirname(out_filename): " + fs::dirname(out_filename);
|
||||
|
||||
fs::connect(fs::dirname(out_filename), long_libname)
|
||||
} else { out_filename };
|
||||
|
||||
log "output: " + output;
|
||||
|
||||
// The default library location, we need this to find the runtime.
|
||||
// The location of crates will be determined as needed.
|
||||
let stage: str = "-L" + sess.filesearch().get_target_lib_path();
|
||||
|
|
|
|||
|
|
@ -561,7 +561,10 @@ fn build_output_filenames(ifile: str, ofile: option::t<str>,
|
|||
obj_filename = base_filename + "." + suffix;
|
||||
|
||||
if sess.building_library() {
|
||||
saved_out_filename = std::os::dylib_filename(base_filename);
|
||||
let dirname = fs::dirname(base_filename);
|
||||
let basename = fs::basename(base_filename);
|
||||
let dylibname = std::os::dylib_filename(basename);
|
||||
saved_out_filename = fs::connect(dirname, dylibname);
|
||||
} else {
|
||||
saved_out_filename = base_filename;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue