Add -Z profile-emit=<path> for Gcov gcda output.

Adds a -Z flag to control the file path that the Gcov gcda output is
written to during runtime. This flag expects a path and filename, e.g.
-Z profile-emit=gcov/out/lib.gcda.

This works similar to GCC/Clang's -fprofile-dir flag which allows
control over the output path for gcda coverage files.
This commit is contained in:
Ivan Lozano 2020-05-26 13:41:40 -04:00
parent aeca4d6428
commit 0c1ef853bb
4 changed files with 11 additions and 4 deletions

View file

@ -557,6 +557,7 @@ fn test_debugging_options_tracking_hash() {
tracked!(plt, Some(true));
tracked!(print_fuel, Some("abc".to_string()));
tracked!(profile, true);
tracked!(profile_emit, Some(PathBuf::from("abc")));
tracked!(relro_level, Some(RelroLevel::Full));
tracked!(report_delayed_bugs, true);
tracked!(run_dsymutil, false);