[libc-commits] [libc] [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (PR #98075)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Jul 8 14:07:32 PDT 2024
jhuber6 wrote:
So, this replaces every single namespace declaration with the following?
```c
#define LIBC_NAMESPACE_DECL [[gnu::visibility("hidden")]] LIBC_NAMESPACE
```
Before that we need to identify all the entrypoints and make sure they retain default visibility. @frobtech suggested that we split that up into introducing a macro for exporting global variables, then we'd need to make sure that `LIBC_FUNCTION_ATTRS` includes default visibility.
However, that's if we want non-hidden visibility at all. The main effect of everything being hidden is that if someone does `clang -shared foo.c -lc` with our `libc` the symbols won't be visible from the shared library. Maybe that's the desired behavior? The GPU doesn't care because we have no shared libraries.
https://github.com/llvm/llvm-project/pull/98075
More information about the libc-commits
mailing list