[llvm] Export LLVM plugin entrypoint for windows shared library builds (PR #115431)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 17:31:13 PST 2024


================
@@ -107,7 +107,7 @@ class PassPlugin {
 ///   };
 /// }
 /// ```
-extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
+extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK LLVM_ABI_EXPORT
----------------
compnerd wrote:

Because it is dynamically bound, yes, it cannot be `__declspec(dllimport)`. This either has to be passed indirectly or be looked up dynamically with `GetProcAddress`.

https://github.com/llvm/llvm-project/pull/115431


More information about the llvm-commits mailing list