rust/compiler/rustc_codegen_ssa
Jack Huey ec0e0d1e7a
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.
2021-05-18 22:36:04 -04:00
..
src Rollup merge of #85274 - luqmana:linker-is-gnu-gc-sections, r=petrochenkov 2021-05-18 22:36:04 -04:00
Cargo.toml Auto merge of #83640 - bjorn3:shared_metadata_reader, r=nagisa 2021-05-14 12:58:58 +00:00
README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.