dtolnay/cargo-llvm-lines

Warning: ignoring emit path because multiple .ll files were produced

dtolnay opened this issue · 5 comments

Reported here:

$ git clone https://github.com/mit-pdos/distributary
$ cd distributary
$ cargo llvm-lines --manifest-path benchmarks/Cargo.toml --bin vote --release
   Compiling benchmarks v0.0.1 (file:///home/jon/dev/projects/distributary/benchmarks)
warning: ignoring emit path because multiple .ll files were produced
    Finished release [optimized + debuginfo] target(s) in 9.94 secs
      1    1  core::num::dec2flt::algorithm::fpu_precision::set_precision
$ cargo llvm-lines --lib --release
   Compiling distributary v0.1.0 (file:///home/jon/dev/projects/distributary)
warning: ignoring emit path because multiple .ll files were produced
    Finished release [optimized + debuginfo] target(s) in 90.79 secs
     34    1  <serde_json::read::Reference<'b, 'c, T> as core::ops::deref::Deref>::deref

Also reported here.

@jonhoo @sgrif I have not been able to reproduce this yet. :( I see the expected output in both cases, using rustc 1.24.0-nightly (f9b0897c5 2017-12-02) on x86_64-unknown-linux-gnu. I will give it another try later but I would appreciate any debugging you guys are able to do.

crates.io$ cargo llvm-lines --lib | head -20
   Compiling cargo-registry v0.2.2 (file:///github/crates.io)
    Finished dev [unoptimized + debuginfo] target(s) in 39.26 secs
  56284   46  <serde_json::de::Deserializer<R>>::parse_value
  43123  472  <core::option::Option<T>>::map
  39130   91  <diesel::connection::statement_cache::StatementCache<DB, Statement>>::cached_statement::{{closure}}
  34164 1679  core::ptr::drop_in_place
  33033   91  <diesel::connection::statement_cache::StatementCache<DB, Statement>>::cached_statement
  32691   57  <diesel::query_builder::select_statement::SelectStatement<F, S, D, W, O, L, Of, G, FU> as diesel::query_builder::QueryFragment<DB>>::walk_ast
  29848   91  diesel::pg::connection::PgConnection::prepare_query
  20398   22  <serde::private::de::content::ContentDeserializer<'de, E> as serde::de::Deserializer<'de>>::deserialize_any
  18453  157  <core::result::Result<T, E>>::map
  16653   91  <diesel::connection::statement_cache::StatementCacheKey<DB>>::for_source
  14469   91  diesel::pg::connection::PgConnection::prepare_query::{{closure}}
  12194   91  diesel::connection::statement_cache::refmut_map_result
  11904   64  <serde_json::ser::Compound<'a, W, F> as serde::ser::SerializeMap>::serialize_value
  11091   28  <serde_json::de::SeqAccess<'a, R> as serde::de::SeqAccess<'de>>::next_element_seed
  11011   91  diesel::connection::statement_cache::refmut_map_result::{{closure}}
  10628   83  <core::result::Result<T, E>>::map_err
  10426   66  <diesel::pg::connection::PgConnection as diesel::connection::Connection>::query_by_index
  10080  120  diesel::query_builder::QueryFragment::is_safe_to_cache_prepared
  10010   91  <diesel::connection::statement_cache::StatementCacheKey<DB>>::construct_sql
   9970   82  <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
sgrif commented

If nothing else, here's rustc --version

rustc 1.24.0-nightly (73bca2b9f 2017-11-28)

It looks like you're running the identical command in the identical directory. The only other thing of note that I can think of is that I have export CARGO_INCREMENTAL = 1 in my .zshrc. I will try a more recent nightly when I have a chance.

Ah thanks, it seems that was it! We will need to find a way to make it work with multiple .ll files, or else unset CARGO_INCREMENTAL when spawning the compiler process.

crates.io$ CARGO_INCREMENTAL=1 cargo llvm-lines --lib | head -20
   Compiling cargo-registry v0.2.2 (file:///github/crates.io)
warning: ignoring emit path because multiple .ll files were produced
    Finished dev [unoptimized + debuginfo] target(s) in 34.77 secs
    584    1  cargo_registry::version::yank::modify_yank
     13    1  cargo_registry::version::yank::unyank
     13    1  cargo_registry::version::yank::yank
sgrif commented

Hah well I'm glad I thought to mention that!

6c537a1 fixed this for me. I released cargo-llvm-lines 0.1.2 and let's follow up if anyone continues to see this error.