We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32ddd02 commit f44fa63Copy full SHA for f44fa63
compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -315,7 +315,10 @@ impl<'a> GccLinker<'a> {
315
fn build_dylib(&mut self, out_filename: &Path) {
316
// On mac we need to tell the linker to let this library be rpathed
317
if self.sess.target.is_like_osx {
318
- self.cmd.arg("-dynamiclib");
+ if !self.is_ld {
319
+ self.cmd.arg("-dynamiclib");
320
+ }
321
+
322
self.linker_arg("-dylib");
323
324
// Note that the `osx_rpath_install_name` option here is a hack
0 commit comments