[clang] [llvm] Add __attribute__((visibility("default"))) attribute to certain symbols to stop them being hidden when linking clangInterpreter library to other libraries during Emscripten build (PR #146786)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 02:27:59 PDT 2025
mcbarton wrote:
> > Also, this is separate to the issue to making a Windows Shared library issue here #109483 (this purely based on your comment that ' the annotation effort hasn't progressed to them yet')
>
> That same work also enables building libLLVM/libclang with `-fvisibilty=hidden`, which it sounds like what you are actually doing, and which is currently not a supported configuration. (At least going by your comment that `-fvisibility=default` works, which should already be the implicit default.)
It is not the default for Web Assembly as far as I understand based on https://github.com/WebAssembly/tool-conventions/issues/176 (see line 'A long while ago we choose to make -fvisibility=hidden the default for the WebAssembly backend in llvm') and https://github.com/emscripten-core/emscripten/blob/b0c461c10482e12f88e192e04b3640acb1577f64/emcc.py#L203 (see 'even though the upstream backend defaults visibility=hidden'). @sbc100 will be able to say for certain.
https://github.com/llvm/llvm-project/pull/146786
More information about the llvm-commits
mailing list