[llvm] Export LLVM plugin entrypoint for windows shared library builds (PR #115431)
Thomas Fransham via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 23:53:27 PST 2024
================
@@ -107,7 +107,13 @@ class PassPlugin {
/// };
/// }
/// ```
+
+#if defined(_WIN32) && defined(LLVM_BUILD_LLVM_DYLIB)
+extern "C" ::llvm::PassPluginLibraryInfo __declspec(dllexport)
+llvmGetPassPluginInfo();
+#else
extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
llvmGetPassPluginInfo();
+#endif
----------------
fsfod wrote:
That looks a really painful way to declare it.
https://github.com/llvm/llvm-project/pull/115431
More information about the llvm-commits
mailing list