linker: Bail out of rpath logic early if the target doesn't support rpath
This commit is contained in:
@@ -2096,6 +2096,10 @@ fn add_rpath_args(
|
||||
codegen_results: &CodegenResults,
|
||||
out_filename: &Path,
|
||||
) {
|
||||
if !sess.target.has_rpath {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME (#2397): At some point we want to rpath our guesses as to
|
||||
// where extern libraries might live, based on the
|
||||
// add_lib_search_paths
|
||||
@@ -2114,7 +2118,6 @@ fn add_rpath_args(
|
||||
let rpath_config = RPathConfig {
|
||||
libs: &*libs,
|
||||
out_filename: out_filename.to_path_buf(),
|
||||
has_rpath: sess.target.has_rpath,
|
||||
is_like_osx: sess.target.is_like_osx,
|
||||
linker_is_gnu: sess.target.linker_flavor.is_gnu(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user