Rollup merge of #104137 - StackDoubleFlow:err-lsc-unsupported, r=bjorn3
Issue error when -C link-self-contained option is used on unsupported platforms The documentation was also updated to reflect this. I'm assuming the supported platforms are the same as initially written in [RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-17). Fixes #103576
This commit is contained in:
commit
fbcd751ea1
6 changed files with 16 additions and 7 deletions
|
@ -1588,6 +1588,9 @@ fn detect_self_contained_mingw(sess: &Session) -> bool {
|
|||
/// We only provide such support for a very limited number of targets.
|
||||
fn self_contained(sess: &Session, crate_type: CrateType) -> bool {
|
||||
if let Some(self_contained) = sess.opts.cg.link_self_contained {
|
||||
if sess.target.link_self_contained == LinkSelfContainedDefault::False {
|
||||
sess.emit_err(errors::UnsupportedLinkSelfContained);
|
||||
}
|
||||
return self_contained;
|
||||
}
|
||||
|
||||
|
|
|
@ -530,3 +530,7 @@ pub enum AppleSdkRootError<'a> {
|
|||
pub struct ReadFileError {
|
||||
pub message: std::io::Error,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(codegen_ssa_unsupported_link_self_contained)]
|
||||
pub struct UnsupportedLinkSelfContained;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue