Skip to content

Remove LlvmArchiveBuilder after a few months if no regression is found #128955

Open
@jieyouxu

Description

@jieyouxu

Support reading thin archives in ArArchiveBuilder #128936 switches from using LlvmArchiveBuilder to ArArchiveBuilder.

Activity

added
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 11, 2024
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 11, 2024
removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 11, 2024
pirama-arumuga-nainar

pirama-arumuga-nainar commented on Feb 13, 2025

@pirama-arumuga-nainar

In Android, we have a CI that builds AOSP with ToT clang toolchain and the latest Android Rust toolchain (currently 1.83). We use LTO for both clang and rust. If a C++ object is added to an .rlib, rustc complains about mismatched LLVM versions

LLVM error: Invalid attribute group entry (Producer: 'LLVM20.0.0' Reader: 'LLVM 19.0.1)

even though the build step is just packaging the object files and not merging the LLVM IR modules. The final link is performed by the lld from ToT llvm-project, which can correctly handle LLVM IR from different producers.

@pcc added a change to LLVM ArchiveBuilder that only ignores this error when building a static lib: llvm/llvm-project#96848. It'd be great if ArArchiveBuilder also has the ability to ignore unknown bitcode when creating rlibs.

(cc: @stephenhines @maurer)

bjorn3

bjorn3 commented on Feb 14, 2025

@bjorn3
Member

Opened #137017 to turn the error into a warning.

added 3 commits that reference this issue on Feb 28, 2025

Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…

02047d2

Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…

e0dc41a

Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…

61e9004
added a commit that references this issue on Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bjorn3@pirama-arumuga-nainar@jieyouxu@rustbot

        Issue actions

          Remove `LlvmArchiveBuilder` after a few months if no regression is found · Issue #128955 · rust-lang/rust