[Bazel][mlir] Avoid ODR violation introduced in 7ab749c.

This change also prepares for 9119325 to land again.

Adds `mlir_c_runner_utils_hdrs` and `mlir_runner_utils_hdrs` targets which do not depend on `//llvm::Support`.

These can be used by other 'runner.so' targets if they are loaded along with the 'runner_utils.so' without calling `__mlir_execution_engine_init()` twice.
This commit is contained in:
Christian Sigg
2023-06-22 07:50:38 +02:00
parent cea0eea28e
commit cd482968dc

View File

@@ -7928,6 +7928,7 @@ cc_library(
":SparseTensorEnums",
":SparseTensorRuntime",
":mlir_float16_utils",
"//llvm:Support",
],
)
@@ -7937,6 +7938,11 @@ alias(
actual = "_mlir_c_runner_utils",
)
cc_headers_only(
name = "mlir_c_runner_utils_hdrs",
src = ":mlir_c_runner_utils",
)
cc_binary(
name = "libmlir_c_runner_utils.so",
linkshared = True,
@@ -7961,6 +7967,11 @@ alias(
actual = "_mlir_runner_utils",
)
cc_headers_only(
name = "mlir_runner_utils_hdrs",
src = ":mlir_runner_utils",
)
cc_binary(
name = "libmlir_runner_utils.so",
linkshared = True,
@@ -8019,7 +8030,7 @@ cc_library(
],
deps = [
":LLVMSupportHeaders",
":mlir_c_runner_utils",
":mlir_c_runner_utils_hdrs",
"@cuda//:cuda_headers",
"@cuda//:cusparse_static",
"@cuda//:libcuda",
@@ -8071,13 +8082,11 @@ cc_binary(
name = "libvulkan-runtime-wrappers.so",
srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
linkshared = True,
linkstatic = False,
tags = [
"manual", # External dependency
],
deps = [
":VulkanRuntime",
"//llvm:Support",
],
deps = [":VulkanRuntime"],
)
cc_binary(