Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jieyouxu opened this issue Aug 11, 2024 · 2 comments
Open

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

jieyouxu opened this issue Aug 11, 2024 · 2 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

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

@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 11, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 11, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 11, 2024
@pirama-arumuga-nainar
Copy link

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
Copy link
Member

bjorn3 commented Feb 14, 2025

Opened #137017 to turn the error into a warning.

jieyouxu added a commit to jieyouxu/rust that referenced this issue Feb 28, 2025
…li-obk

Don't error when adding a staticlib with bitcode files compiled by newer LLVM

cc rust-lang#128955 (comment)
jieyouxu added a commit to jieyouxu/rust that referenced this issue Feb 28, 2025
…li-obk

Don't error when adding a staticlib with bitcode files compiled by newer LLVM

cc rust-lang#128955 (comment)
jieyouxu added a commit to jieyouxu/rust that referenced this issue Feb 28, 2025
…li-obk

Don't error when adding a staticlib with bitcode files compiled by newer LLVM

cc rust-lang#128955 (comment)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 1, 2025
Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=oli-obk

Don't error when adding a staticlib with bitcode files compiled by newer LLVM

cc rust-lang#128955 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants