[Mlir-commits] [mlir] [mlir] Workaround for export lib generation on Windows for `mlir_arm_sme_abi_stubs` (PR #73147)

Ivan Butygin llvmlistbot at llvm.org
Wed Nov 22 18:39:14 PST 2023


================
@@ -181,6 +181,7 @@ if(LLVM_ENABLE_PIC)
   add_mlir_library(mlir_arm_sme_abi_stubs
     SHARED
     ArmSMEStubs.cpp)
+  target_compile_definitions(mlir_arm_sme_abi_stubs PRIVATE mlir_arm_sme_abi_stubs_EXPORTS)
----------------
Hardcode84 wrote:

`LLVM_ATTRIBUTE_WEAK` is expanding to empty macro on Windows, which resulted dll without any exported symbols, and export lib is not being generated for such dll (I don't know if it's general cmake behavior, llvm cmake or microsoft linker behavior). Adding `__declspec(dllexport)` fixed it. We don't see this for other libs because all of them export some symbols.

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


More information about the Mlir-commits mailing list