Repository navigation
compiler: preserve C/C++ source basename in artifact identity - #331
Merged
codeandsolder-git-wrangler[bot] merged 6 commits intoNov 22, 2026
Merged
Conversation
The compiler records the source file name in the object (an STT_FILE symbol on ELF), but the preprocessed output it is hashed from has no line markers, so two sources that preprocess to the same text, such as files that are entirely #ifdef'd out, ended up sharing one cache entry and one of them got an object naming the other. Hash the file name without its directory, so the same file still hits across checkouts. Closes mozilla#2959 (cherry picked from commit 5808192)
ptxas reads a .ptx file that nvcc names after the source, so identical device code from two sources stopped sharing a cubin. (cherry picked from commit 8d96278)
… file names Move the choice of which inputs keep their file name in the hash key into hashed_input_file_name, and check that cudafe++, PTX and cubin inputs with the same content but different names hash the same, while C and CUDA sources with different names still differ. (cherry picked from commit f4ba08d)
codeandsolder-git-wrangler
Bot
deleted the
port/upstream-c-filename-20261122
branch
November 22, 2026 16:37
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.
Cherry-pick 5808192, 8d96278 and f4ba08d. Preserve canonical-native path handling and CUDA device intermediate reuse. Domain-separate affected artifact and direct-mode index keys so old direct entries cannot bypass the fix, with an explicit old-key regression. Validation pending.