Only expose public functions in GNU compiler builds if SM64_LIB_EXPORT is defined.
This is useful for WebAssembly builds, since `libsm64` is built as a static library and the final linked `.wasm` file might not want to expose the `libsm64` functions.
This commit is contained in:
@@ -12,7 +12,11 @@
|
|||||||
#define SM64_LIB_FN __declspec(dllimport)
|
#define SM64_LIB_FN __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||||
|
#ifdef SM64_LIB_EXPORT
|
||||||
#define SM64_LIB_FN __attribute__ ((visibility("default")))
|
#define SM64_LIB_FN __attribute__ ((visibility("default")))
|
||||||
|
#else
|
||||||
|
#define SM64_LIB_FN
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define SM64_LIB_FN
|
#define SM64_LIB_FN
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user