[PATCH] D146405: [mlir][Bazel] Avoid __attribute__((weak)) for MSVC.
Adrian Kuegel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 02:17:48 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa348ba21f8d8: [mlir][Bazel] Avoid __attribute__((weak)) for MSVC. (authored by akuegel).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146405/new/
https://reviews.llvm.org/D146405
Files:
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Index: utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -4101,7 +4101,13 @@
// Provide a weak registration stub in case the real SerializeToCubin is not
// linked in.
+#if defined(_MSC_VER)
+// This might not work correctly, but it avoids a compilation error because
+// MSVC does not support __attribute__((weak)).
+void mlir::registerGpuSerializeToCubinPass() {}
+#else
__attribute__((weak)) void mlir::registerGpuSerializeToCubinPass() {}
+#endif
""",
],
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146405.506505.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230320/7be492eb/attachment.bin>
More information about the llvm-commits
mailing list