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,10 +12,14 @@
|
||||
#define SM64_LIB_FN __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#ifdef SM64_LIB_EXPORT
|
||||
#define SM64_LIB_FN __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define SM64_LIB_FN
|
||||
#endif
|
||||
#else
|
||||
#define SM64_LIB_FN
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user