Skip to content

Commit 71285c1

Browse files
committed
prepare stabilization of modern linker-flavors
fix a few comments
1 parent bf9a1c8 commit 71285c1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,9 +2758,8 @@ pub fn build_session_options(
27582758
}
27592759

27602760
// For testing purposes, until we have more feedback about these options: ensure `-Z
2761-
// unstable-options` is required when using the unstable `-C link-self-contained` options, like
2762-
// `-C link-self-contained=+linker`, and when using the unstable `-C linker-flavor` options, like
2763-
// `-C linker-flavor=gnu-lld-cc`.
2761+
// unstable-options` is required when using the unstable `-C link-self-contained` and `-C
2762+
// linker-flavor` options.
27642763
if !nightly_options::is_unstable_enabled(matches) {
27652764
let uses_unstable_self_contained_option =
27662765
cg.link_self_contained.are_unstable_variants_set();

compiler/rustc_target/src/spec/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ pub enum LinkerFlavor {
164164

165165
/// Linker flavors available externally through command line (`-Clinker-flavor`)
166166
/// or json target specifications.
167-
/// FIXME: This set has accumulated historically, bring it more in line with the internal
168-
/// linker flavors (`LinkerFlavor`).
167+
/// This set has accumulated historically, and contains both (stable and unstable) legacy values, as
168+
/// well as modern ones matching the internal linker flavors (`LinkerFlavor`).
169169
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
170170
pub enum LinkerFlavorCli {
171-
// New (unstable) flavors, with direct counterparts in `LinkerFlavor`.
171+
// Modern (unstable) flavors, with direct counterparts in `LinkerFlavor`.
172172
Gnu(Cc, Lld),
173173
Darwin(Cc, Lld),
174174
WasmLld(Cc),
@@ -179,7 +179,7 @@ pub enum LinkerFlavorCli {
179179
Bpf,
180180
Ptx,
181181

182-
// Below: the legacy stable values.
182+
// Legacy stable values
183183
Gcc,
184184
Ld,
185185
Lld(LldFlavor),
@@ -504,7 +504,7 @@ linker_flavor_cli_impls! {
504504
(LinkerFlavorCli::Bpf) "bpf"
505505
(LinkerFlavorCli::Ptx) "ptx"
506506

507-
// Below: legacy stable values
507+
// Legacy stable flavors
508508
(LinkerFlavorCli::Gcc) "gcc"
509509
(LinkerFlavorCli::Ld) "ld"
510510
(LinkerFlavorCli::Lld(LldFlavor::Ld)) "ld.lld"

0 commit comments

Comments
 (0)