-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
#[inline(never)]
pub fn alpha() -> usize {
println!("alpha");
12
}
#[inline(never)]
pub fn beta() -> usize {
println!("beta");
12
}
Current output
$ rustc lib.rs --crate-type lib --emit asm -C codegen-units=2
warning: ignoring emit path because multiple .s files were produced
warning: 1 warning emitted
Desired output
blank
Rationale and extra context
Error originates from somewhere around here and implies that I passed --emit foo=some_name
, while in fact I only passed --emit foo
rust/compiler/rustc_codegen_ssa/src/back/write.rs
Lines 595 to 599 in fe61575
if crate_output.outputs.contains_key(&output_type) { | |
// 2) Multiple codegen units, with `--emit foo=some_name`. We have | |
// no good solution for this case, so warn the user. | |
sess.dcx().emit_warn(errors::IgnoringEmitPath { extension }); | |
} else if crate_output.single_output_file.is_some() { |
Other cases
No response
Rust Version
rustc 1.78.0-nightly (1a648b397 2024-02-11)
binary: rustc
commit-hash: 1a648b397dedc98ada3dd3360f6d661ec2436c56
commit-date: 2024-02-11
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.