
On Wed, Mar 3, 2021 at 12:13 PM Marek BehĂșn marek.behun@nic.cz wrote:
Use the `__visible` macro to declare entires and lists declared by ll_entry_declare() and ll_entry_declare_list() externally visible, so that when building with LTO the compiler does not optimize this data away.
__visible is defined like this:
/* * Optional: not supported by clang * * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-ext... */ #if __has_attribute(__externally_visible__) # define __visible __attribute__((__externally_visible__)) #else # define __visible #endif
It says clang does not support this. So what about clang?
Signed-off-by: Marek BehĂșn marek.behun@nic.cz
include/linker_lists.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Regards, Bin