[PATCH] D73577: [compiler-rt] Build all alias in builtin as private external on Darwin

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 13:56:28 PST 2020


steven_wu added a comment.

In D73577#1845550 <https://reviews.llvm.org/D73577#1845550>, @kledzik wrote:

> Should there be a COMPILER_RT_ALIAS and COMPILER_RT_HIDDEN_ALIAS macro?   Does this change effect the libcompiler_rt.dylib in the OS. In the dylib, I suspect the aliases should be global.


compiler_rt is unconditionally built with `-fvisibility=hidden`. There is no reason to have none private extern symbols in the static library for Darwin. Maybe it can be a problem for building libcompiler_rt.dylib. I guess I can condition the macro based on -DVISIBILITY_HIDDEN

In D73577#1845560 <https://reviews.llvm.org/D73577#1845560>, @delcypher wrote:

> @steven_wu I'm having difficultly understanding the description.
>
> > For builtin compiler-rt, it is built with visibility hidden by default
> >  to avoid the client exporting symbols from libclang static library.
>
> You mean to avoid exporting symbols from the libclang_rt to the client, right?


yes.

> 
> 
>> The compiler option doesn't work on the alias which is created with inline assembly.
> 
> What is "The compiler option"?  You mean the default visibility compiler option, right?

-fvisibility=hidden

>> On Darwin platform, thoses aliases are exported by default if
>>  they are reference by the client.
>>  Fix the issue by adding ".private_extern" to all the aliases on Darwin
> 
> It is really not obvious what "the issue" is here? Are you saying that the "On Darwin platform, thoses aliases are exported by default if they are reference by the client." behaviour is what is happening right now and that this behaviour is incorrect?

Right now, the aliases are exported symbols by default from the client on darwin if you don't use an export list. That is not the correct behavior.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73577/new/

https://reviews.llvm.org/D73577





More information about the llvm-commits mailing list