Skip to content

Fix Symbol Visibility#72

Open
StDymphna wants to merge 2 commits into
lunarmodules:masterfrom
StDymphna:master
Open

Fix Symbol Visibility#72
StDymphna wants to merge 2 commits into
lunarmodules:masterfrom
StDymphna:master

Conversation

@StDymphna

Copy link
Copy Markdown

Explicitly marks API symbols with attribute((visibility("default")) on GNU compatible compilers. When building with -fvisibility=hidden, LTO, etc., each lib had its symbol hidden.

This ensures the shared libraries will respectively export luaopen_compat53_io, luaopen_compat53_string, luaopen_compat53_table, and luaopen_compat53_utf8.

Comment thread lprefix.h Outdated

#undef LUAMOD_API
#define LUAMOD_API extern
#define LUAMOD_API __attribute__((visibility("default"))) extern

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs to be wrapped with if defined(__GNUC__) like the other cases below.

@cclauss

cclauss commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Status? Should this be rebased?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants