-
Notifications
You must be signed in to change notification settings - Fork 279
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
Changes from 22 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 f8ad844
Added a new implementation of `c2rust-instrument` that invokes `cargo…
kkysen 9361bc1
Updated the snapshot as this rearranges basic block orders (which I t…
kkysen b31e7b7
Don't need the runtime argument at all now as it's specified as a nor…
kkysen 7ccf6d7
Forgot to update the profile dir in `pdg.sh` as now we can specify an…
kkysen 5882db5
Now that we use `cargo` normally and include `c2rust_analysis_rt` as …
kkysen 54ae7ea
Removed unused imports and re-formatted.
kkysen 25fe611
Removed `pretty-instrument-err.mjs` as it's no longer needed since we…
kkysen 11450dd
Moved the metadata file and binary artifact deletion to inside the Ru…
kkysen bde50b6
Use `cargo run` instead of `cargo build` now that we can specify any …
kkysen 0aeb0f7
Now that all binary name uses are gone, we can delete the last `node`…
kkysen 9f5dfe8
Updated `pdg.sh` documentation now that `node` scripts are gone and `…
kkysen d9b3d29
Now that the `get-binary-names-from-cargo-metadata.mjs` `node` script…
kkysen f083284
Don't need to `unset RUSTC_WRAPPER` in `pdg.sh` anymore as we now ove…
kkysen 95c6f08
Removed runtime args from `pdg.sh` as those are not used anymore.
kkysen e3d221e
Updated (and able to shorten considerably) the `pdg.sh` documentation.
kkysen b6c98ac
Extracted a few functions from `main` to clean things up.
kkysen 322b5ee
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen baf5a8d
Formatted.
kkysen 0a46ad8
Updated the snapshot back to a `debug` not `release` build, so there …
kkysen 3c81f03
Allow `NotFound` errors on `target/` when looking for files to delete.
kkysen ca49ca8
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen 035670e
Use `cargo clean --package` to clean the root package instead of tryi…
kkysen cd390cb
Use `$CARGO` for `cargo metadata` if possible.
kkysen a1fdf17
Switched to using `$CARGO_PRIMARY_PACKAGE` (as suggested by @rinon) i…
kkysen d28775a
Now removed the crate target passing as `$CARGO_PRIMARY_PACKAGE` works.
kkysen 8c5568d
Pass the metadata path directly (not through json-encoded `Instrument…
kkysen 63beb5e
Remove `env-logger` dependency. Not sure why I added it.
kkysen 045c62d
Replaced `eyre` with `anyhow` by a literal find and replace.
kkysen d8c0b49
Removed a redundant `anyhow` to `eyre` conversion now that we're back…
kkysen c035e75
In the non-instrumenting case, use `RunCompiler` instead of invoking …
kkysen 8e9e94e
Use `TimePassesCallbacks::default()` instead of `NullCallbacks` as th…
kkysen 0ab0a30
Removed the old `cargo` dependency version and all its dependencies, …
kkysen 676dee2
Deleted `c2rust-dynamic-instrumentation`'s `lib.rs` and moved it all …
kkysen 407d39c
Removed unused `extern crate rustc_target`.
kkysen e32281c
Renamed `c2rust-dynamic-instrumentation` to `c2rust-instrument` so th…
kkysen 6595ad8
Now `CARGO_TARGET_DIR=instrument.target` is set so that normal `cargo…
kkysen de3fd2a
Make `c2rust-analysis-rt` an optional dependency in the instrumented …
kkysen 5633286
Extracted `fn add_runtime_feature`.
kkysen 6bc9906
Added a small abstraction around `cargo` invocations to simplify thin…
kkysen 6265cfa
Removed `$RUST_SYSROOT` code as it's no longer used anywhere.
kkysen 628266b
Implemented `get_sysroot_slow` using `rustc --print sysroot` (copied …
kkysen ee163e1
Extracted `rustc_wrapper` and `cargo_wrapper` into separate functions.
kkysen d1997b4
Don't need to link to `rustc` private crates in `c2rust` anymore (sin…
kkysen c1a95e2
Print the command if a `cargo` invocation fails.
kkysen 3012d46
Set `RUSTUP_TOOLCHAIN=$(cat rust-toolchain)` so that we always use th…
kkysen 434ddcb
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen 4bf8600
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen 657cf24
Now we resolve the sysroot in the `cargo` wrapper and pass it to the …
kkysen 5ce75c4
Simplified an import.
kkysen 2660946
Don't instrument build scripts.
kkysen 93f88db
Added documentation for why we use the current build script detection…
kkysen 5abd6d6
Added more thorough documentation.
kkysen d99b9a8
Move the previous `lib.rs` code in `main.rs` to `callbacks.rs` for a …
kkysen 1f502b9
Merge branch 'master' into kkysen/instrument-rustc-wrapper
kkysen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ edition = "2021" | |
|
||
[dependencies] | ||
libc = "0.2" | ||
c2rust-analysis-rt = { path = "../../analysis/runtime"} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.