You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of bug
Running cargo rustc -- --emit=llvm-ir does not produce output IR. Instead, a warning message "warning: ignoring emit path because multiple .ll files were produced" is printed out.
I expected that running cargo rustc -- --emit=llvm-ir would produce an llvm-ir output file.
Possible Solution(s)
This is not a solution, but running rustc src/main.rs --emit=llvm-ir worked as I expected in both the environments that I tested; llvm-ir output was generated as a file.
Notes
Output of cargo version: cargo 1.41.0-nightly (626f0f4 2019-12-03)
The text was updated successfully, but these errors were encountered:
The .ll files should be in the target\debug\deps directory. (That's where all output goes.)
You may want to turn off incremental compilation (in the profile, or env var), since that changes how rustc splits the code generation (causing multiple files). It is a known issue that incremental causes this: rust-lang/rust#48147
The warning is a false-positive (rust-lang/rust#49801), rustc just seems to be confused when there are multiple .ll files.
Problem
Running
cargo rustc -- --emit=llvm-ir
does not produce output IR. Instead, a warning message "warning: ignoring emit path because multiple .ll files were produced" is printed out.I expected that running
cargo rustc -- --emit=llvm-ir
would produce an llvm-ir output file.Steps
cargo rustc -- --emit=llvm-ir
Possible Solution(s)
This is not a solution, but running
rustc src/main.rs --emit=llvm-ir
worked as I expected in both the environments that I tested; llvm-ir output was generated as a file.Notes
Output of
cargo version
: cargo 1.41.0-nightly (626f0f4 2019-12-03)The text was updated successfully, but these errors were encountered: