Closed smmalis37 closed 4 years ago
Fixed in 0.4.6.
#[cfg(target_arch = "wasm32")]
fn main() {
println!("wasm!");
}
$ cargo llvm-lines --target wasm32-unknown-unknown
Compiling testing v0.0.0 (/git/testing)
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Lines Copies Function name
----- ------ -------------
107 (100%) 10 (100%) (TOTAL)
35 (32.7%) 1 (10.0%) core::fmt::Arguments::new_v1
16 (15.0%) 1 (10.0%) std::rt::lang_start
10 (9.3%) 1 (10.0%) std::rt::lang_start::{{closure}}
9 (8.4%) 1 (10.0%) core::ops::function::FnOnce::call_once
9 (8.4%) 1 (10.0%) core::ops::function::FnOnce::call_once{{vtable.shim}}
9 (8.4%) 1 (10.0%) testing::main
7 (6.5%) 1 (10.0%) <std::process::ExitCode as std::process::Termination>::report
5 (4.7%) 1 (10.0%) <() as std::process::Termination>::report
5 (4.7%) 1 (10.0%) core::ptr::drop_in_place
2 (1.9%) 1 (10.0%) main
It would be nice to have support for passing through cargo's
--target
option to get results from a cross-compilation.