require -Zunstable-options
to use new link-self-contained values and
linker flavors - only the stable values for `-Clink-self-contained` can be used on stable until we have more feedback on the interface - `-Zunstable-options` is required to use unstable linker flavors
This commit is contained in:
parent
051e94d50e
commit
38dca73456
2 changed files with 53 additions and 10 deletions
|
@ -181,6 +181,29 @@ pub enum LinkerFlavorCli {
|
|||
PtxLinker,
|
||||
}
|
||||
|
||||
impl LinkerFlavorCli {
|
||||
/// Returns whether this `-C linker-flavor` option is one of the unstable values.
|
||||
pub fn is_unstable(&self) -> bool {
|
||||
match self {
|
||||
LinkerFlavorCli::Gnu(..)
|
||||
| LinkerFlavorCli::Darwin(..)
|
||||
| LinkerFlavorCli::WasmLld(..)
|
||||
| LinkerFlavorCli::Unix(..)
|
||||
| LinkerFlavorCli::Msvc(Lld::Yes)
|
||||
| LinkerFlavorCli::EmCc
|
||||
| LinkerFlavorCli::Bpf
|
||||
| LinkerFlavorCli::Ptx
|
||||
| LinkerFlavorCli::BpfLinker
|
||||
| LinkerFlavorCli::PtxLinker => true,
|
||||
LinkerFlavorCli::Gcc
|
||||
| LinkerFlavorCli::Ld
|
||||
| LinkerFlavorCli::Lld(..)
|
||||
| LinkerFlavorCli::Msvc(Lld::No)
|
||||
| LinkerFlavorCli::Em => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
pub enum LldFlavor {
|
||||
Wasm,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue