DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit ad482c91b54ed7622084bf1a58ccc52c03579226
parent ef1bb41477e635bbccb4dc44115e9cb19af2dc0f
Author: falkTX <falktx@falktx.com>
Date:   Thu, 28 Jul 2022 17:55:24 +0200

Make sure wasm LV2 function symbols are exported

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/lv2/lv2.h | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/distrho/src/lv2/lv2.h b/distrho/src/lv2/lv2.h @@ -355,7 +355,9 @@ typedef struct _LV2_Descriptor { Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library. */ -#ifdef _WIN32 +#if defined(__EMSCRIPTEN__) +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __attribute__((used)) +#elif defined(_WIN32) # define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __declspec(dllexport) #else # define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __attribute__((visibility("default")))