diff --git a/libunwind/src/assembly.h b/libunwind/src/assembly.h index 84c9d526f1d75..9c35b6050a2bf 100644 --- a/libunwind/src/assembly.h +++ b/libunwind/src/assembly.h @@ -254,6 +254,8 @@ aliasname: \ #define NO_EXEC_STACK_DIRECTIVE // clang-format on +#elif defined(__wasm__) + #else #error Unsupported target diff --git a/libunwind/src/config.h b/libunwind/src/config.h index f017403fa2234..73162995f9293 100644 --- a/libunwind/src/config.h +++ b/libunwind/src/config.h @@ -75,13 +75,14 @@ #define _LIBUNWIND_EXPORT #define _LIBUNWIND_HIDDEN #else - #if !defined(__ELF__) && !defined(__MACH__) && !defined(_AIX) - #define _LIBUNWIND_EXPORT __declspec(dllexport) - #define _LIBUNWIND_HIDDEN - #else - #define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) - #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) - #endif +#if !defined(__ELF__) && !defined(__MACH__) && !defined(_AIX) && \ + !defined(__wasm__) +#define _LIBUNWIND_EXPORT __declspec(dllexport) +#define _LIBUNWIND_HIDDEN +#else +#define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) +#define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) +#endif #endif #define STR(a) #a