Skip to content

Commit 7c18a4f

Browse files
disconnect3dPaulGrandperrin
authored andcommitted
Fix profiling not building binary in known dir
1 parent 079cc43 commit 7c18a4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/cargo-hfuzz.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ fn hfuzz_build<T>(args: T, crate_root: &Path, build_type: &BuildType) where T: s
222222
.env("CARGO_TARGET_DIR", &honggfuzz_target) // change target_dir to not clash with regular builds
223223
.env("CRATE_ROOT", &crate_root);
224224

225-
if *build_type != BuildType::Debug && *build_type != BuildType::ProfileWithGrcov {
225+
if *build_type == BuildType::ProfileWithGrcov {
226+
command.env("CARGO_HONGGFUZZ_BUILD_VERSION", VERSION) // used by build.rs to check that versions are in sync
227+
.env("CARGO_HONGGFUZZ_TARGET_DIR", &honggfuzz_target); // env variable to be read by build.rs script
228+
} // to place honggfuzz executable at a known location
229+
else if *build_type != BuildType::Debug {
226230
command.arg("--release")
227231
.env("CARGO_HONGGFUZZ_BUILD_VERSION", VERSION) // used by build.rs to check that versions are in sync
228232
.env("CARGO_HONGGFUZZ_TARGET_DIR", &honggfuzz_target); // env variable to be read by build.rs script

0 commit comments

Comments
 (0)