-Zembed-source: Don't try to warn about incompatible codegen backends

This commit is contained in:
Mrmaxmeier
2024-08-06 20:31:12 +02:00
parent 608901b9c0
commit 6899f5a8e1
3 changed files with 0 additions and 13 deletions

View File

@@ -1305,9 +1305,6 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
let dwarf_version =
sess.opts.unstable_opts.dwarf_version.unwrap_or(sess.target.default_dwarf_version);
let uses_llvm_backend =
matches!(sess.opts.unstable_opts.codegen_backend.as_deref(), None | Some("llvm"));
if dwarf_version < 5 {
sess.dcx().emit_warn(errors::EmbedSourceInsufficientDwarfVersion { dwarf_version });
}
@@ -1315,10 +1312,6 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
if sess.opts.debuginfo == DebugInfo::None {
sess.dcx().emit_warn(errors::EmbedSourceRequiresDebugInfo);
}
if !uses_llvm_backend {
sess.dcx().emit_warn(errors::EmbedSourceRequiresLLVMBackend);
}
}
if sess.opts.unstable_opts.instrument_xray.is_some() && !sess.target.options.supports_xray {