Skip to content

Symbol mismatch with cxxbridge-cmd in Bazel #1676

@sayrer

Description

@sayrer

In my build, the linker was looking for symbols like _twitter_text$cxxbridge1$0$autolink_all but the Rust static library contained symbols like _twitter_text$cxxbridge1$189$autolink_all. This happened because:

  1. The cxxbridge-cmd tool generates C++ bridge code with version $0$ when processing standalone .rs files
  2. The Rust compiler embeds the actual cxx crate version (1.0.189, hence $189$) into symbols when building the library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions