[mlir] Fix missing mlir-capi-global-constructors-test on standalone build (#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.
This commit is contained in:
Michał Górny 2025-08-20 19:50:07 +02:00 committed by GitHub
parent 9f1679190e
commit d76bb2bb89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)