profraw_target_dir

Function profraw_target_dir 

Source
pub fn profraw_target_dir() -> PathBuf
Expand description

Resolve the llvm-cov-target directory for profraw output.

Cascade:

  1. LLVM_COV_TARGET_DIR — explicit operator override.
  2. LLVM_PROFILE_FILE’s parent directory — when an outer harness (cargo-llvm-cov, or the cargo-ktstr LLVM_PROFILE_FILE injection that prevents host-side default.profraw leakage from the cargo ktstr test path) has already pinned the output location.
  3. <current_exe parent>/llvm-cov-target/ — workspace-local fallback so an instrumented binary invoked without any coordination still drops profraw next to the build output rather than in cwd.

pub rather than pub(crate) so the cargo-ktstr binary can resolve the same directory before exec-ing cargo nextest run, keeping host-side and guest-side profraw output co-located in one tree without cargo-ktstr re-implementing the cascade.