[libc-commits] [libc] [libc] Set default visibility for LLVM functions (PR #116686)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Nov 19 14:28:56 PST 2024
petrhosek wrote:
> > I agree with @jhuber6, I think we should keep `LLVM_LIBC_FUNCTION_ATTR` and introduce a new `config.json` option to let you set the default (and if unset we should default to hidden).
>
> IMO, the default visibility of `libc.a` should be hidden and `lib.so` should be default. Maybe some day we'll install `libc.so`, my understanding is that it is contingent on having `dl.so` functioning.
While you cannot build `libc.so` purely out of LLVM libc (yet), there are several projects that combine LLVM libc with downstream bits to build `libc.so` (effectively linking `libllvmlibc.a` into `libc.so`), for example Fuchsia or Android, and that use case requires default visibility.
https://github.com/llvm/llvm-project/pull/116686
More information about the libc-commits
mailing list