Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes #709. * Fixes #708. This adds an MVP of a `cargo` wrapper for `c2rust-analyze` so that it can be run on a whole crate like `cargo`. This copies the approach from `c2rust-instrument`, with some minor adjustments: * We don't care about the instrumentation and metadata `c2rust-instrument` need, so that code is gone. * We still allow `c2rust-analyze` to be called as a `rustc_wrapper` directly. More specifically, the `cargo` wrapper is supposed to set `RUST_SYSROOT`. `c2rust-instrument` requires this, while `c2rust-analyze` will re-calculate it if it wasn't. This allows us to keep using the `rustc` wrapper in tests, as the tests are all set up as single files meant to be compiled with `rustc` directly. We can change this, but that'll come later. The exception is the `lighttpd_minimal` and `with_pdg_file` tests, as those run on full crates. I converted `lighttpd_minimal` to use the `cargo` wrapper as a proof of concept to show it works. I tried to do the same for `with_pdg_file`, but it updated some of the hashes or something so now the PDG binary has out-of-date `DefPathHash`es, and I'm not sure how to regenerate a new one.
- Loading branch information