Allow linking utf8_validity alongside protobuf in cargo builds. - #2011
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
`libprotobuf` has undefined references to `utf8_range_IsValid` and `utf8_range_ValidPrefix`, which are provided by `libutf8_validity`. Previously, `collect_protobuf_libs` only accepted the archive named `protobuf`. This change extends the allowlist to include `utf8_validity`. The discovery remains an explicit allowlist, because other archives in the protobuf install tree must not be linked together: * `utf8_range` defines the same symbols as `utf8_validity` and causes duplicate symbol errors (`LNK2005`). * `protobuf-lite` duplicates symbols from `protobuf`. * `protoc` and `upb` are not needed by Crubit. This change allows Chromium's `tools/rust/build_crubit.py` to remove the workaround that merged `libutf8_validity` into `libprotobuf`. PiperOrigin-RevId: 981304171
copybara-service
Bot
force-pushed
the
test_981304171
branch
from
September 14, 2026 20:46
2d01256 to
e590431
Compare
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.
Allow linking
utf8_validityalongsideprotobufin cargo builds.libprotobufhas undefined references toutf8_range_IsValidandutf8_range_ValidPrefix, which are provided bylibutf8_validity.Previously,
collect_protobuf_libsonly accepted the archive namedprotobuf.This change extends the allowlist to include
utf8_validity. Thediscovery remains an explicit allowlist, because other archives in the
protobuf install tree must not be linked together:
utf8_rangedefines the same symbols asutf8_validityand causesduplicate symbol errors (
LNK2005).protobuf-liteduplicates symbols fromprotobuf.protocandupbare not needed by Crubit.This change allows Chromium's
tools/rust/build_crubit.pyto removethe workaround that merged
libutf8_validityintolibprotobuf.