[Mlir-commits] [mlir] [mlir] Fix missing `mlir-capi-global-constructors-test` on standalone build (PR #154576)
Michał Górny
llvmlistbot at llvm.org
Wed Aug 20 10:19:48 PDT 2025
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/154576
Add `mlir-capi-global-constructors-test` to `MLIR_TEST_DEPENDS` when `MLIR_ENABLE_EXECUTION_ENGINE` is enabled, to ensure that it is also built during standalone builds, and therefore fix test failure due to the executable being missing.
I don't understand the purpose of `LLVM_ENABLE_PIC AND TARGET ${LLVM_NATIVE_ARCH}` block, but the condition is not true in standalone builds.
Fixes 7610b1372955da55e3dc4e2eb1440f0304a56ac8.
>From d5fe01c3b6b7dbe7e5e0d528e87c7e4e4a9c5c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Wed, 20 Aug 2025 19:15:49 +0200
Subject: [PATCH] [mlir] Fix missing `mlir-capi-global-constructors-test` on
standalone build
Add `mlir-capi-global-constructors-test` to `MLIR_TEST_DEPENDS` when
`MLIR_ENABLE_EXECUTION_ENGINE` is enabled, to ensure that it is also
built during standalone builds, and therefore fix test failure due to
the executable being missing.
I don't understand the purpose of `LLVM_ENABLE_PIC AND TARGET
${LLVM_NATIVE_ARCH}` block, but the condition is not true in standalone
builds.
Fixes 7610b1372955da55e3dc4e2eb1440f0304a56ac8.
---
mlir/test/CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index 7736723ce2ae9..8ddc620ae33be 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -157,7 +157,10 @@ if(MLIR_ENABLE_CUDA_RUNNER)
endif()
if(MLIR_ENABLE_EXECUTION_ENGINE)
- list(APPEND MLIR_TEST_DEPENDS mlir-capi-execution-engine-test)
+ list(APPEND MLIR_TEST_DEPENDS
+ mlir-capi-execution-engine-test
+ mlir-capi-global-constructors-test
+ )
endif()
if(MLIR_ENABLE_ROCM_RUNNER)
More information about the Mlir-commits
mailing list