mstorsjo 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.

Thanks for clarifying this!

Indeed, `-fvisibility=hidden` (or `__attribute__((visibility("hidden")))` or 
`-fvisibility-inlines-hidden` etc) only have an effect with Clang, but the 
embedded attributes for omitting symbols from autoexport that it produces are 
honored by both ld.bfd and LLD.

https://github.com/llvm/llvm-project/pull/138351
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to