This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Support building libLLVM.a archive
Needs RevisionPublic

Authored by phosek on Mar 23 2021, 1:50 AM.

Details

Reviewers
smeenai
beanz
Summary

When distributing LLVM libraries as static archive, it's useful in
some cases to distribute a single combined archive rather than a
set of libraries, since users of this archive don't need to know
the dependencies between individual LLVM libraries.

Diff Detail

Event Timeline

phosek created this revision.Mar 23 2021, 1:50 AM
phosek requested review of this revision.Mar 23 2021, 1:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2021, 1:50 AM
dangyi added a subscriber: dangyi.Mar 23 2021, 1:51 PM

I'm wondering how LLVM_BUILD_LLVM_ARCHIVE interacts with LLVM_DISTRIBUTION_COMPONENTS? More specifically, can we only include a portion of LLVM libraries in libLLVM.a?

I'm wondering how LLVM_BUILD_LLVM_ARCHIVE interacts with LLVM_DISTRIBUTION_COMPONENTS? More specifically, can we only include a portion of LLVM libraries in libLLVM.a?

llvm-archive would be in LLVM_DISTRIBUTION_COMPONENTS, we would need a separate option to select which archives are merged into libLLVM.a.

I'm wondering how LLVM_BUILD_LLVM_ARCHIVE interacts with LLVM_DISTRIBUTION_COMPONENTS? More specifically, can we only include a portion of LLVM libraries in libLLVM.a?

llvm-archive would be in LLVM_DISTRIBUTION_COMPONENTS, we would need a separate option to select which archives are merged into libLLVM.a.

We could make LLVM_BUILD_LLVM_ARCHIVE either a boolean, in which case it includes everything, or a list of libraries to include, that should be a simple change.

phosek updated this revision to Diff 333988.Mar 29 2021, 2:46 PM
phosek added a reviewer: beanz.

I have this uncommitted change: D95727 which updates libLLVM.so to use object libraries, would you be able to also use object libraries to avoid adding this python script?

I have this uncommitted change: D95727 which updates libLLVM.so to use object libraries, would you be able to also use object libraries to avoid adding this python script?

Yes I think so.

smeenai requested changes to this revision.Apr 28 2022, 1:58 PM

Is this still relevant? Requesting changes to clear my queue.

This revision now requires changes to proceed.Apr 28 2022, 1:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2022, 1:58 PM