You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a project with mcount instrumentation, however due to rust-lang/rust#92109 I have to specify a custom set of passes. I tried RUSTFLAGS="-Z instrument-mcount -C passes=\"ee-instrument post-inline-ee-instrument\"" cargo +nightly build --release and RUSTFLAGS="-Z instrument-mcount -C passes=ee-instrument post-inline-ee-instrument" cargo +nightly build --release and some other combinations and I always get errors that look something like this:
@ehuss could you please give an example how to achieve the cargo equivalent rustc -C passes="ee-instrument post-inline-ee-instrument" .... I failed to achieve this with any of your provided alternatives. Note that some versions such as --config 'build.rustflags=["-C", "passes=ee-instrument post-inline-ee-instrument"]' build but don't actually achieve the desired effect, as checked with nm <binary> | rg mcount
If you are using a bash-like shell, something like this should work:
CARGO_ENCODED_RUSTFLAGS=$'-Zinstrument-mcount\u001f-Cpasses=ee-instrument aa-eval' cargo b -v
With -v you should be able to inspect that flags being passed to rustc. If your desired passes/instrumentation aren't showing up, I would suspect its an issue with rustc or the passes being used.
Problem
I'm trying to build a project with mcount instrumentation, however due to rust-lang/rust#92109 I have to specify a custom set of passes. I tried
RUSTFLAGS="-Z instrument-mcount -C passes=\"ee-instrument post-inline-ee-instrument\"" cargo +nightly build --release
andRUSTFLAGS="-Z instrument-mcount -C passes=ee-instrument post-inline-ee-instrument" cargo +nightly build --release
and some other combinations and I always get errors that look something like this:process didn't exit successfully:
rustc - --crate-name ___ --print=file-names -Z instrument-mcount -C 'passes="ee-instrument' 'post-inline-ee-instrument"' --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg
(exit status: 1)To me it seems it doesn't forward the escaped string in an intuitive way to rustc.
Steps
RUSTFLAGS="-Z instrument-mcount -C passes=\"ee-instrument post-inline-ee-instrument\"" cargo +nightly build --release
Possible Solution(s)
No response
Notes
Happens on Linux with zsh and bash.
Version
The text was updated successfully, but these errors were encountered: