[libc-commits] [libc] [libc] Add LIBC_NAMESPACE_HIDDEN_DECL macro (PR #97109)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Fri Jun 28 15:33:32 PDT 2024
jhuber6 wrote:
> Okay, I'm thinking that we should just compile everything with `-fvisibility=hidden`. This prevents exposing our internal symbols, as noted in this patch. The public option macro should then carry something like this in `common.h`
>
> ```c
> #ifdef LIBC_TARGET_IS_GPU
> #define LLVM_LIBC_FUNCTION_ATTR [[gnu::visibility("hidden")]]
> #else
> #define LLVM_LIBC_FUNCTION_ATTR [[gnu::visibility("default")]]
> #endif
> ```
>
> Is this reasonable? I can make a patch for this, or we can update this one.
Alternatively I think we can put that attr in the config.json.
https://github.com/llvm/llvm-project/pull/97109
More information about the libc-commits
mailing list