================
@@ -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
----------------
cpetig wrote:

`__declspec(dllexport)` is clearly a Windows/MSVC specific way to declare 
exports while the `visibility(...)` declaration is more portable and should 
apply to wasm as well (as wasm is neither ELF nor MACH nor AIX)

The first error in wasi-sdk is
`.../wasi-sdk/src/llvm-project/libunwind/src/Unwind-wasm.c:64:1: error: 
'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' 
to enable support for __declspec attributes`

https://github.com/llvm/llvm-project/pull/168449
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to