mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Properly support visibility
This commit is contained in:
parent
6d232bb73c
commit
b1673c3087
2 changed files with 56 additions and 0 deletions
|
@ -4,6 +4,19 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
// Can be used to export public APIs to DLL
|
// Can be used to export public APIs to DLL
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef __GNUC__
|
||||||
|
|
||||||
|
#ifdef LUACODE_API_C_EXPORT
|
||||||
|
#define LUACODE_API extern "C" __attribute__ ((dllexport))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LUACODE_API_EXPORT
|
||||||
|
#define LUACODE_API extern __attribute__ ((dllexport))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#ifdef LUACODE_API_C_EXPORT
|
#ifdef LUACODE_API_C_EXPORT
|
||||||
#define LUACODE_API extern "C" __declspec(dllexport)
|
#define LUACODE_API extern "C" __declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,6 +25,21 @@
|
||||||
#define LUACODE_API extern __declspec(dllexport)
|
#define LUACODE_API extern __declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if __GNUC__ >= 4
|
||||||
|
|
||||||
|
#ifdef LUACODE_API_C_EXPORT
|
||||||
|
#define LUACODE_API extern "C" __attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LUACODE_API_EXPORT
|
||||||
|
#define LUACODE_API extern __attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Can be used to reconfigure visibility/exports for public APIs
|
// Can be used to reconfigure visibility/exports for public APIs
|
||||||
#ifndef LUACODE_API
|
#ifndef LUACODE_API
|
||||||
#define LUACODE_API extern
|
#define LUACODE_API extern
|
||||||
|
|
|
@ -34,6 +34,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Can be used to export public APIs to DLL
|
// Can be used to export public APIs to DLL
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef __GNUC__
|
||||||
|
|
||||||
|
#ifdef LUA_API_C_EXPORT
|
||||||
|
#define LUA_API extern "C" __attribute__ ((dllexport))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LUA_API_EXPORT
|
||||||
|
#define LUA_API extern __attribute__ ((dllexport))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#ifdef LUA_API_C_EXPORT
|
#ifdef LUA_API_C_EXPORT
|
||||||
#define LUA_API extern "C" __declspec(dllexport)
|
#define LUA_API extern "C" __declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
|
@ -42,6 +55,21 @@
|
||||||
#define LUA_API extern __declspec(dllexport)
|
#define LUA_API extern __declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if __GNUC__ >= 4
|
||||||
|
|
||||||
|
#ifdef LUA_API_C_EXPORT
|
||||||
|
#define LUA_API extern "C" __attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LUA_API_EXPORT
|
||||||
|
#define LUA_API extern __attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Can be used to reconfigure visibility/exports for public APIs
|
// Can be used to reconfigure visibility/exports for public APIs
|
||||||
#ifndef LUA_API
|
#ifndef LUA_API
|
||||||
#define LUA_API extern
|
#define LUA_API extern
|
||||||
|
|
Loading…
Add table
Reference in a new issue