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).
This commit is contained in:
Tyler Mandry 2020-05-14 11:46:36 -07:00
parent 1836e3b42a
commit 15c2292298

View file

@ -1422,7 +1422,7 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
add_pre_link_args(cmd, sess, flavor, crate_type);
// NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
if sess.target.target.options.is_like_fuchsia {
if sess.target.target.options.is_like_fuchsia && crate_type == CrateType::Executable {
let prefix = match sess.opts.debugging_opts.sanitizer {
Some(Sanitizer::Address) => "asan/",
_ => "",