Skip to content

Instrument using $RUSTC_WRAPPER and cargo as a subcommand #554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e82e96f
Removed `InstrumentationExecutor::default: DefaultExecutor` as it doe…
kkysen Jul 21, 2022
f8ad844
Added a new implementation of `c2rust-instrument` that invokes `cargo…
kkysen Jul 22, 2022
9361bc1
Updated the snapshot as this rearranges basic block orders (which I t…
kkysen Jul 22, 2022
b31e7b7
Don't need the runtime argument at all now as it's specified as a nor…
kkysen Jul 22, 2022
7ccf6d7
Forgot to update the profile dir in `pdg.sh` as now we can specify an…
kkysen Jul 22, 2022
5882db5
Now that we use `cargo` normally and include `c2rust_analysis_rt` as …
kkysen Jul 22, 2022
54ae7ea
Removed unused imports and re-formatted.
kkysen Jul 22, 2022
25fe611
Removed `pretty-instrument-err.mjs` as it's no longer needed since we…
kkysen Jul 22, 2022
11450dd
Moved the metadata file and binary artifact deletion to inside the Ru…
kkysen Jul 22, 2022
bde50b6
Use `cargo run` instead of `cargo build` now that we can specify any …
kkysen Jul 22, 2022
0aeb0f7
Now that all binary name uses are gone, we can delete the last `node`…
kkysen Jul 22, 2022
9f5dfe8
Updated `pdg.sh` documentation now that `node` scripts are gone and `…
kkysen Jul 22, 2022
d9b3d29
Now that the `get-binary-names-from-cargo-metadata.mjs` `node` script…
kkysen Jul 22, 2022
f083284
Don't need to `unset RUSTC_WRAPPER` in `pdg.sh` anymore as we now ove…
kkysen Jul 22, 2022
95c6f08
Removed runtime args from `pdg.sh` as those are not used anymore.
kkysen Jul 22, 2022
e3d221e
Updated (and able to shorten considerably) the `pdg.sh` documentation.
kkysen Jul 22, 2022
b6c98ac
Extracted a few functions from `main` to clean things up.
kkysen Jul 22, 2022
322b5ee
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen Jul 22, 2022
baf5a8d
Formatted.
kkysen Jul 22, 2022
0a46ad8
Updated the snapshot back to a `debug` not `release` build, so there …
kkysen Jul 22, 2022
3c81f03
Allow `NotFound` errors on `target/` when looking for files to delete.
kkysen Jul 22, 2022
ca49ca8
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen Jul 22, 2022
035670e
Use `cargo clean --package` to clean the root package instead of tryi…
kkysen Jul 27, 2022
cd390cb
Use `$CARGO` for `cargo metadata` if possible.
kkysen Jul 27, 2022
a1fdf17
Switched to using `$CARGO_PRIMARY_PACKAGE` (as suggested by @rinon) i…
kkysen Jul 27, 2022
d28775a
Now removed the crate target passing as `$CARGO_PRIMARY_PACKAGE` works.
kkysen Jul 27, 2022
8c5568d
Pass the metadata path directly (not through json-encoded `Instrument…
kkysen Jul 27, 2022
63beb5e
Remove `env-logger` dependency. Not sure why I added it.
kkysen Jul 27, 2022
045c62d
Replaced `eyre` with `anyhow` by a literal find and replace.
kkysen Jul 27, 2022
d8c0b49
Removed a redundant `anyhow` to `eyre` conversion now that we're back…
kkysen Jul 27, 2022
c035e75
In the non-instrumenting case, use `RunCompiler` instead of invoking …
kkysen Jul 28, 2022
8e9e94e
Use `TimePassesCallbacks::default()` instead of `NullCallbacks` as th…
kkysen Jul 28, 2022
0ab0a30
Removed the old `cargo` dependency version and all its dependencies, …
kkysen Jul 28, 2022
676dee2
Deleted `c2rust-dynamic-instrumentation`'s `lib.rs` and moved it all …
kkysen Jul 28, 2022
407d39c
Removed unused `extern crate rustc_target`.
kkysen Jul 28, 2022
e32281c
Renamed `c2rust-dynamic-instrumentation` to `c2rust-instrument` so th…
kkysen Jul 28, 2022
6595ad8
Now `CARGO_TARGET_DIR=instrument.target` is set so that normal `cargo…
kkysen Jul 28, 2022
de3fd2a
Make `c2rust-analysis-rt` an optional dependency in the instrumented …
kkysen Jul 28, 2022
5633286
Extracted `fn add_runtime_feature`.
kkysen Jul 28, 2022
6bc9906
Added a small abstraction around `cargo` invocations to simplify thin…
kkysen Jul 28, 2022
6265cfa
Removed `$RUST_SYSROOT` code as it's no longer used anywhere.
kkysen Jul 28, 2022
628266b
Implemented `get_sysroot_slow` using `rustc --print sysroot` (copied …
kkysen Jul 28, 2022
ee163e1
Extracted `rustc_wrapper` and `cargo_wrapper` into separate functions.
kkysen Jul 28, 2022
d1997b4
Don't need to link to `rustc` private crates in `c2rust` anymore (sin…
kkysen Jul 28, 2022
c1a95e2
Print the command if a `cargo` invocation fails.
kkysen Jul 29, 2022
3012d46
Set `RUSTUP_TOOLCHAIN=$(cat rust-toolchain)` so that we always use th…
kkysen Jul 29, 2022
434ddcb
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen Jul 29, 2022
4bf8600
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen Jul 30, 2022
657cf24
Now we resolve the sysroot in the `cargo` wrapper and pass it to the …
kkysen Jul 30, 2022
5ce75c4
Simplified an import.
kkysen Jul 30, 2022
2660946
Don't instrument build scripts.
kkysen Jul 30, 2022
93f88db
Added documentation for why we use the current build script detection…
kkysen Aug 1, 2022
5abd6d6
Added more thorough documentation.
kkysen Aug 1, 2022
d99b9a8
Move the previous `lib.rs` code in `main.rs` to `callbacks.rs` for a …
kkysen Aug 2, 2022
1f502b9
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen Aug 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.log
# ignore rust build dirs everywhere
**/target/
**/instrument.target/
**/tests/
/build
*.pyc
Expand Down
Loading