Skip to content

Commit 15c2292

Browse files
committed
Don't pass --dynamic-linker for Fuchsia dylibs
This was causing a PT_INTERP header in Fuchsia dylibs (implying that they're executable when they're not).
1 parent 1836e3b commit 15c2292

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_codegen_ssa/back

1 file changed

+1
-1
lines changed

src/librustc_codegen_ssa/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
14221422
add_pre_link_args(cmd, sess, flavor, crate_type);
14231423

14241424
// NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
1425-
if sess.target.target.options.is_like_fuchsia {
1425+
if sess.target.target.options.is_like_fuchsia && crate_type == CrateType::Executable {
14261426
let prefix = match sess.opts.debugging_opts.sanitizer {
14271427
Some(Sanitizer::Address) => "asan/",
14281428
_ => "",

0 commit comments

Comments
 (0)