[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Use LLVM_BUILD_LLVM_DYLIB instead of BUILD_SHARED_LIBS
From: |
Maxime Devos |
Subject: |
Re: [RFC] Use LLVM_BUILD_LLVM_DYLIB instead of BUILD_SHARED_LIBS |
Date: |
Fri, 26 Aug 2022 20:24:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
On 20-04-2022 12:56, Zhu Zihao wrote:
We may introduce following problems if we apply this solution.
1. Increase the closure size of LLVM.
By default, if LLVM_BUILD_LLVM_DYLIB is set true, LLVM still tries to
build the static archive. This may increase the closure size of LLVM.
And some package linking with LLVM may use the static archive instead of
linking to the dynamic library.
My opinion: If we're OK with the bigger closure size, that's not a
problem. If not, we may consider disable the static archive generation.
For LLVM components, we can use `LLVM_LINK_LLVM_DYLIB` to ask these
packages to link with the shared version. For package use `llvm-config`
directly or indirectly, we can pass `--link-shared` to it.
IIUC, this causes the static libraries to be built, right?
If so, they could be moved into a separate output.
I would prefer to disable static libraries, those cause problems with
grafts and size usage. If not possible, I would prefer them to be in a
separate output, to avoid them being used by accident and to reduce the
closure size of dependents of LLVM that use the shared version.
Greetings,
Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature