I'm experimenting with build pipelining in the fuchsia build
--emit=metadata output sufficient for this, or is there another magic flag that makes the rmeta "more complete"?
I'm getting unexpected errors now that I produce rmeta files
I believe it should be, but I'm not sure that the compiler expects that exactly
it might help to tell the compiler to emit the "okay metadata is done now" message
(I forget how to do that, but either grepping Cargo source for pipelining or trying a cargo build should work). IIRC, it's something like
--json artifact-notifications, but I could be wrong.
so, the main thing I'm doing differently is I'm not emitting the rlib in the same invocation
I suspect this is causing the rmeta file to be incomplete somehow
hm, perhaps, but I would expect no
(in theory you can check)
i.e., an rlib is I believe an
ar archive so you can pull out the rmeta and diff them
What errors are you getting?
@simulacrum sorry, got sidetracked
there are multiple issues, and one of them that is preventing me from making progress
--emit=metadata=<path> is not respected
(the other issues I know of are my fault, but they muddy the waters on the original question)
--emit=metadata seems hardcoded to emit
there might be ways of working around this on my end, but it's probably not worth it for an experiment
oh, I don't think that works for anything?
--emit=metdata=path is not a supported syntax?
-o does, but I don't think
but if the hardcoding is a concern, then yeah, that might not be avoidable, not sure
--emit=metdata=pathis not a supported syntax?
Yeah, I don’t believe this is a syntax we support, although maybe something has changed? Definitely looks unusual.
For pipelining I believe you also need to consume the json output as that has signals that indicate when something gets done
(I think @tmandry is trying "precompiled" pipelining, i.e., that the rmetas are already available way ahead of time)
I have wondered if we could make
cargo build kick off all dependencies at the same time if you already had a
cargo check previously completed (common case, realistically)
we support it for dep-info:
and when I have that, plus
-o, I get a warning
okay I got it running, I think it had to do with the order of args
hitting an ICE now :grimacing:
(I think tmandry is trying "precompiled" pipelining, i.e., that the rmetas are already available way ahead of time)
I'm actually experimenting with doing the work twice, in a large build, in an environment with high parallelism
i.e. spawning off
--emit=link jobs simultaneously
no idea if it will be better, though
I would expect that to be strictly worse, but who knows :)
--emit THING=PATH is definitely a syntax that is supported. It looks like
metadata is the only one that doesn't respect it, and I would say that is a bug (or at least it should be a warning/error if you specify it).
As for the original question, I'm pretty sure you need to include
link to get a compatible
rmeta file. Maybe nnethercote knows why?
From the ICE I'm seeing, it seems like the rmeta does not include MIR for generic functions
cc @Nicholas Nethercote