Bug 2033336 - Build absolute paths relative to full GCNO path when available. - #1519
Merged
Merged
Conversation
Contributor
Author
|
The failure on nightly is caused by rust-lang/rust#161517 and unrelated to my changes. |
nicolas-guichard
force-pushed
the
push-pvlzyyqpussp
branch
3 times, most recently
from
September 8, 2026 21:01
f8f2b94 to
a1efc08
Compare
Collaborator
|
@nicolas-guichard could you rebase? |
rust-lang/rust#161517 (part of 2026-09-07) changed the coverage output slightly, this accepts both versions.
…malize_path fails. When building Firefox with unified build, the GCNO files embed paths relative to the GCNO file itself. For instance when building media/libopus, the build system generates obj-x86_64-pc-linux-gnu/media/libopus/Unified_c_media_libopus0.c, which includes ../../../media/libopus/celt/bands.c, and the GCNO ends up with the path ./../../../media/libopus/celt/bands.c. Grcov needs to convert this back to the full path to $srcdir/media/ libopus/celt/bands.c or it fails later on when get_abs_path calls normalize_path.
nicolas-guichard
force-pushed
the
push-pvlzyyqpussp
branch
from
September 9, 2026 09:07
a1efc08 to
da7e65c
Compare
marco-c
reviewed
Sep 9, 2026
Collaborator
|
Path handling has always been a pain... At some point we might want to simplify all of it. BTW, I hope this change won't increase memory too much when dealing with a lot of files. |
marco-c
approved these changes
Sep 9, 2026
lando-worker Bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Sep 11, 2026
This new grcov release includes a bugfix for GCNOs pointing to C++ files outside the objdir with relative paths, as we typically get when building with unified sources. See mozilla/grcov#1519 for details. Differential Revision: https://phabricator.services.mozilla.com/D325306
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bugzilla URL: https://bugzilla.mozilla.org/show_bug.cgi?id=2033336
When building Firefox with unified build, the GCNO files embed paths relative to the GCNO file itself.
For instance when building media/libopus, the build system generates obj-x86_64-pc-linux-gnu/media/libopus/Unified_c_media_libopus0.c, which includes ../../../media/libopus/celt/bands.c, and the GCNO ends up with the path ./../../../media/libopus/celt/bands.c.
Grcov needs to convert that back to the full path to $srcdir/media/ libopus/celt/bands.c.
Try run with this fix along with a fix for bug 2070023: https://treeherder.mozilla.org/jobs?repo=try&revision=843bcb9b6e9bc83f8d7dac2eb45f72259e06af42