]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ELF/Mach-O: Force default visibility for public API functions.
authorMike Pall <mike>
Sun, 16 Nov 2025 18:41:51 +0000 (19:41 +0100)
committerMike Pall <mike>
Sun, 16 Nov 2025 18:41:51 +0000 (19:41 +0100)
Thanks to Dymphna. #1409

src/jit/bcsave.lua
src/luaconf.h

index e4ca19779db9af738b26eb2761259dbf66cccd9b..5a55789a9af163e4af66971c8d354131474ded0f 100644 (file)
@@ -165,6 +165,8 @@ extern "C"
 #endif
 #ifdef _WIN32
 __declspec(dllexport)
+#elif (defined(__ELF__) || defined(__MACH__) || defined(__psp2__)) && !((defined(__sun__) && defined(__svr4__)) || defined(__CELLOS_LV2__))
+__attribute__((visibility("default")))
 #endif
 const unsigned char %s%s[] = {
 ]], LJBC_PREFIX, ctx.modname))
index 7cd2edb5a4ae9cc57568a97914ec8cca03fd98e4..6959313d3deefebe3e51ed3a08b898648d4645fa 100644 (file)
 #else
 #define LUA_API                __declspec(dllimport)
 #endif
+#elif (defined(__ELF__) || defined(__MACH__) || defined(__psp2__)) && !((defined(__sun__) && defined(__svr4__)) || defined(__CELLOS_LV2__))
+#define LUA_API                extern __attribute__((visibility("default")))
 #else
 #define LUA_API                extern
 #endif