Open
Description
Support reading thin archives in ArArchiveBuilder #128936 switches from using LlvmArchiveBuilder
to ArArchiveBuilder
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
pirama-arumuga-nainar commentedon Feb 13, 2025
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 versionseven 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 commentedon Feb 14, 2025
Opened #137017 to turn the error into a warning.
Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…
Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…
Rollup merge of rust-lang#137017 - bjorn3:ignore_invalid_bitcode, r=o…
Unrolled build for rust-lang#137017