-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

@ -18,8 +18,6 @@ session_embed_source_insufficient_dwarf_version = `-Zembed-source=y` requires at
session_embed_source_requires_debug_info = `-Zembed-source=y` requires debug information to be enabled
session_embed_source_requires_llvm_backend = `-Zembed-source=y` is only supported on the LLVM codegen backend
session_expr_parentheses_needed = parentheses are required to parse this as an expression
session_failed_to_create_profiler = failed to create profiler: {$err}

View File

@ -175,10 +175,6 @@ pub(crate) struct EmbedSourceInsufficientDwarfVersion {
#[diag(session_embed_source_requires_debug_info)]
pub(crate) struct EmbedSourceRequiresDebugInfo;
#[derive(Diagnostic)]
#[diag(session_embed_source_requires_llvm_backend)]
pub(crate) struct EmbedSourceRequiresLLVMBackend;
#[derive(Diagnostic)]
#[diag(session_target_stack_protector_not_supported)]
pub(crate) struct StackProtectorNotSupportedForTarget<'a> {

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 {