[clang] [Clang][Cygwin] attempt to fix building shared libclang. (PR #138351)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 5 03:11:16 PDT 2025


tyan0 wrote:

> Surprisingly, it looks like Cygwin (@tyan0) is working around the export limit on gcc by setting `-DCMAKE_SHARED_LINKER_FLAGS=-fvisibility=hidden`. 

This was my misunderstanding. Building successfully was due to `-DLLVM_TARGETS_TO_BUILD=X86` which restrict target architecture only to x86. `-fvisibility=hidden` does not seem to take effect.

I wonder why your msys2 build scripts does not fail to build even with `-DLLVM_TARGETS_TO_BUILD="AArch64;ARM;X86"` and gcc/g++.



https://github.com/llvm/llvm-project/pull/138351


More information about the cfe-commits mailing list