diff --git a/add-soname.patch b/add-soname.patch index adc3891..591be40 100644 --- a/add-soname.patch +++ b/add-soname.patch @@ -20,16 +20,16 @@ Forwarded: no --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs -@@ -1017,12 +1017,6 @@ +@@ -1017,6 +1017,12 @@ cmd.args(&rpath::get_rpath_flags(&mut rpath_config)); } - -- if (crate_type == config::CrateTypeDylib || crate_type == config::CrateTypeCdylib) && t.options.linker_is_gnu { -- let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap()); -- let soname = [String::from("-Wl,-soname=") + &filename]; -- cmd.args(&soname); -- } -- + ++ if (crate_type == config::CrateTypeDylib || crate_type == config::CrateTypeCdylib) && t.options.linker_is_gnu { ++ let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap()); ++ let soname = [String::from("-Wl,-soname=") + &filename]; ++ cmd.args(&soname); ++ } ++ // Finally add all the linker arguments provided on the command line along // with any #[link_args] attributes found inside the crate if let Some(ref args) = sess.opts.cg.link_args {