gnzlbg / cargo-asm

cargo subcommand showing the assembly or llvm-ir generated for Rust code
https://github.com/gnzlbg/cargo-asm
Other
1.17k stars 36 forks source link

[ERROR]: cargo asm could not find any output files! #183

Closed GregWoods closed 4 years ago

GregWoods commented 4 years ago

using rust 1.43.0 My code compiles just fine Compiling for stm32f411

Running cargo asm in the root of my project, (and in \target and its subfolders), produces the error: [ERROR]: cargo asm could not find any output files!

I am not sure what other info to supply. I'm sure I'm making some noob mistake, but I can't figure it out.

rubdos commented 4 years ago

Are you by any chance using .cargo/config to supply the --target? It seems like for me, manually supplying --target=armv7-unknown-linux-gnueabihf helps. Of course, substitute with your embedded target of choice.

GregWoods commented 4 years ago

Progress! Thanks for that. cargo asm --target thumbv7em-none-eabihf works. It output a huge list.

I would have expected it to respect my cargo.config. There is an option --no-default-features - "Disables all cargo features when building the project." - which implies that cargo settings are being used by default.

I am still not able to produce any output, but it is a different error, I will raise a new issue.

rubdos commented 4 years ago

I'd actually consider this a bug myself, I had the exact same issue yesterday. Maybe it's useful to reword and reopen this?

GregWoods commented 4 years ago

How about "Cannot find output files when target is set in .cargo/config"

rubdos commented 4 years ago

I think it would be great if you reopened this with that as reworded title! At least it's useful to keep track of this issue :smile: