dtolnay / cargo-llvm-lines

Count lines of LLVM IR per generic function
Apache License 2.0
413 stars 24 forks source link

rustc options not being recognized #43

Closed andbleo closed 3 years ago

andbleo commented 3 years ago

I am trying to pass arguments to rustc and it is failing with unrecognized options. Example:

cargo llvm-lines -- -q
   Compiling time v0.2.25 (/home/blah/code/time-0.2.25)
error: Unrecognized option: 'q'
error: could not compile `time`

This was with cargo-llvm-lines 0.4.10.

dtolnay commented 3 years ago

Rustc does not take a -q flag:

$  rustc -q
error: Unrecognized option: 'q'

-q is a Cargo flag so it would need to be passed in front of the -- separator, just like e.g. cargo build -q. I opened #44 to add that.

andbleo commented 3 years ago

My bad. I assumed that the options that rustc could be passed were the same as those specified in cargo help rustc.