diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel index 89413d6ccbaac..effcd615786bf 100644 --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -9794,6 +9794,29 @@ cc_binary( deps = [":mlir_float16_utils"], ) +cc_library( + name = "_mlir_apfloat_utils", + srcs = ["lib/ExecutionEngine/APFloatWrappers.cpp"], + defines = ["mlir_apfloat_wrappers_EXPORTS"], + includes = ["include"], + deps = [ + "//llvm:Support", + ], +) + +# Indirection to avoid 'libmlir_apfloat_utils.so' filename clash. +alias( + name = "mlir_apfloat_utils", + actual = "_mlir_apfloat_utils", +) + +cc_binary( + name = "libmlir_apfloat_utils.so", + linkshared = True, + linkstatic = False, + deps = [":mlir_apfloat_utils"], +) + # Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make # this a shared library: because on the CMake side, doing so causes issues # when building on Windows. In particular, various functions take/return