Uh oh!
There was an error while loading. Please reload this page.
Save metadata even with -Z no-trans (e.g. for multi-crate cargo check). - #33602
Conversation
rust-highfive
commented
May 12, 2016
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
michaelwoerister
commented
May 12, 2016
I'm going to review this right now.. |
michaelwoerister
commented
May 12, 2016
bors
commented
May 12, 2016
📌 Commit adee551 has been approved by |
eddyb
commented
May 13, 2016
eddyb
commented
May 13, 2016
@bors r=michaelwoerister d'oh this PR wasn't even in the rollup 😫 |
bors
commented
May 13, 2016
📌 Commit adee551 has been approved by |
…rister Save metadata even with -Z no-trans (e.g. for multi-crate cargo check). Removes the item symbol map in metadata, as we can now generate them in a deterministic manner. The `-Z no-trans` change lets the LLVM passes and linking run, but with just metadata and no code. It fails while trying to link a binary because there's no `main` function, which is correct but not good UX. There's also no way to easily throw away all of the artifacts to rebuild with actual code generation. We might want `cargo check` to do that using cargo-internal information and then it would just work. cc @alexcrichton@nikomatsakis@Aatch@michaelwoerister
eddyb
commented
May 13, 2016
@bors rollup- |
bors
commented
May 14, 2016
☔ The latest upstream changes (presumably #33632) made this pull request unmergeable. Please resolve the merge conflicts. |
eddyb
commented
May 14, 2016
@bors r=michaelwoerister |
bors
commented
May 14, 2016
📌 Commit 5087556 has been approved by |
eddyb
commented
May 14, 2016
Oh wait I didn't fix the failure in @alexcrichton's test. @bors r- |
eddyb
commented
May 14, 2016
@bors r=michaelwoerister |
bors
commented
May 14, 2016
📌 Commit d2ded31 has been approved by |
bors
commented
May 15, 2016
⌛ Testing commit d2ded31 with merge 33a8175... |
bors
commented
May 25, 2016
💔 Test failed - auto-linux-64-opt-rustbuild |
eddyb
commented
May 25, 2016
@bors r=michaelwoerister |
bors
commented
May 25, 2016
📌 Commit a619901 has been approved by |
bors
commented
May 25, 2016
Save metadata even with -Z no-trans (e.g. for multi-crate cargo check). Removes the item symbol map in metadata, as we can now generate them in a deterministic manner. The `-Z no-trans` change lets the LLVM passes and linking run, but with just metadata and no code. It fails while trying to link a binary because there's no `main` function, which is correct but not good UX. There's also no way to easily throw away all of the artifacts to rebuild with actual code generation. We might want `cargo check` to do that using cargo-internal information and then it would just work. cc @alexcrichton@nikomatsakis@Aatch@michaelwoerister
bors
commented
May 25, 2016
…haelwoerister Drive trans from the output of the translation item collector This PR changes the way how translation works above the item level. Instead of walking the HIR and calling `trans_item()` on everything encountered (while instantiating monomorphizations on-demand), we now just process the list of translation items generated by the `trans::collector`. Using the collector has the benefit of being able to know the exact set of monomorphizations and symbols before actually running translation, something that is crucial for incremental compilation (but also has [other benefits](#33602)). The collector has existed for quite a while now, but so far it's output was only used for running some auto-tests. With this PR it becomes the only source of truth about what gets translated. One modification we had to make, compared to the initial approach, is that closures are not represented as their own `TransItems`. Doing so, while still supporting non-MIR-based translation, would have been prohibitively complex, and not worth the trouble since legacy-trans will disappear sooner or later. Once there is solely MIR-trans, it would be a good idea to make closures `TransItems` again. This PR removes the most obvious functions and tables that are not needed anymore, but there's definitely still more cleanup possible later on (e.g. `monomorphize::monomorphic_fn()` does very little at this point). Since there are already more than 10 commits in here, doing this in a separate PR seems to be a better idea. These changes definitely warrant a crater run. Thanks @Aatch, for taking on one of the more tedious tasks during the dev-sprint! Thanks @eddyb, for doing some nice refactorings to symbol name generation and making sure these landed so I could use them! cc @rust-lang/compiler cc @rust-lang/tools
Drive trans from the output of the translation item collector This PR changes the way how translation works above the item level. Instead of walking the HIR and calling `trans_item()` on everything encountered (while instantiating monomorphizations on-demand), we now just process the list of translation items generated by the `trans::collector`. Using the collector has the benefit of being able to know the exact set of monomorphizations and symbols before actually running translation, something that is crucial for incremental compilation (but also has [other benefits](#33602)). The collector has existed for quite a while now, but so far it's output was only used for running some auto-tests. With this PR it becomes the only source of truth about what gets translated. One modification we had to make, compared to the initial approach, is that closures are not represented as their own `TransItems`. Doing so, while still supporting non-MIR-based translation, would have been prohibitively complex, and not worth the trouble since legacy-trans will disappear sooner or later. Once there is solely MIR-trans, it would be a good idea to make closures `TransItems` again. This PR removes the most obvious functions and tables that are not needed anymore, but there's definitely still more cleanup possible later on (e.g. `monomorphize::monomorphic_fn()` does very little at this point). Since there are already more than 10 commits in here, doing this in a separate PR seems to be a better idea. These changes definitely warrant a crater run. Thanks @Aatch, for taking on one of the more tedious tasks during the dev-sprint! Thanks @eddyb, for doing some nice refactorings to symbol name generation and making sure these landed so I could use them! cc @rust-lang/compiler cc @rust-lang/tools
Drive trans from the output of the translation item collector This PR changes the way how translation works above the item level. Instead of walking the HIR and calling `trans_item()` on everything encountered (while instantiating monomorphizations on-demand), we now just process the list of translation items generated by the `trans::collector`. Using the collector has the benefit of being able to know the exact set of monomorphizations and symbols before actually running translation, something that is crucial for incremental compilation (but also has [other benefits](#33602)). The collector has existed for quite a while now, but so far it's output was only used for running some auto-tests. With this PR it becomes the only source of truth about what gets translated. One modification we had to make, compared to the initial approach, is that closures are not represented as their own `TransItems`. Doing so, while still supporting non-MIR-based translation, would have been prohibitively complex, and not worth the trouble since legacy-trans will disappear sooner or later. Once there is solely MIR-trans, it would be a good idea to make closures `TransItems` again. This PR removes the most obvious functions and tables that are not needed anymore, but there's definitely still more cleanup possible later on (e.g. `monomorphize::monomorphic_fn()` does very little at this point). Since there are already more than 10 commits in here, doing this in a separate PR seems to be a better idea. These changes definitely warrant a crater run. Thanks @Aatch, for taking on one of the more tedious tasks during the dev-sprint! Thanks @eddyb, for doing some nice refactorings to symbol name generation and making sure these landed so I could use them! cc @rust-lang/compiler cc @rust-lang/tools
Removes the item symbol map in metadata, as we can now generate them in a deterministic manner.
The
-Z no-transchange lets the LLVM passes and linking run, but with just metadata and no code.It fails while trying to link a binary because there's no
mainfunction, which is correct but not good UX.There's also no way to easily throw away all of the artifacts to rebuild with actual code generation.
We might want
cargo checkto do that using cargo-internal information and then it would just work.cc @alexcrichton@nikomatsakis@Aatch@michaelwoerister