about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2021-05-18 22:36:04 -0400
committerGitHub <noreply@github.com>2021-05-18 22:36:04 -0400
commitec0e0d1e7aac94245dfe0c11f55c9ba6d2754aba (patch)
tree366aa54a500ddb17d691d2e558ec215411f2e307 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent37ecede50758eaf42372d7ec4b653ea06d8ee160 (diff)
parentac5fd90d822304a6b6e059d84a3c1e4103e24200 (diff)
downloadrust-ec0e0d1e7aac94245dfe0c11f55c9ba6d2754aba.tar.gz
rust-ec0e0d1e7aac94245dfe0c11f55c9ba6d2754aba.zip
Rollup merge of #85274 - luqmana:linker-is-gnu-gc-sections, r=petrochenkov
Only pass --[no-]gc-sections if linker is GNU ld.

Fixes a regression from #84468 where linking now fails with solaris linkers. LinkerFlavor::Gcc does not always mean GNU ld specifically. And in the case of at least the solaris ld in illumos, that flag is unrecognized and will cause the linking step to fail.

Even though removing the `is_like_solaris` branch from `gc_sections` in #84468 made sense as `-z ignore/record` are more analogous to the `--[no-]-as-needed` flags, it inadvertently caused solaris linkers to be passed the `--gc-sections` flag. So let's just change it to be more explicit about when we pass those flags.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions