mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-24 12:34:19 +00:00

The execution engine would not be functional anyway, we're already disabling the tests, this also disable the rest of the code. Anecdotally this reduces the number of static library built when the builtin target is disabled goes from 236 to 218. Here is the complete list of LLVM targets built when running `ninja check-mlir`: libLLVMAggressiveInstCombine.a libLLVMAnalysis.a libLLVMAsmParser.a libLLVMBinaryFormat.a libLLVMBitReader.a libLLVMBitstreamReader.a libLLVMBitWriter.a libLLVMCore.a libLLVMDebugInfoCodeView.a libLLVMDebugInfoDWARF.a libLLVMDemangle.a libLLVMFileCheck.a libLLVMFrontendOpenMP.a libLLVMInstCombine.a libLLVMIRReader.a libLLVMMC.a libLLVMMCParser.a libLLVMObject.a libLLVMProfileData.a libLLVMRemarks.a libLLVMScalarOpts.a libLLVMSupport.a libLLVMTableGen.a libLLVMTableGenGlobalISel.a libLLVMTextAPI.a libLLVMTransformUtils.a Differential Revision: https://reviews.llvm.org/D117287
80 lines
1.6 KiB
CMake
80 lines
1.6 KiB
CMake
function(_add_capi_test_executable name)
|
|
cmake_parse_arguments(ARG
|
|
""
|
|
""
|
|
"LINK_LIBS"
|
|
${ARGN})
|
|
set(LLVM_LINK_COMPONENTS
|
|
)
|
|
add_llvm_executable(${name}
|
|
PARTIAL_SOURCES_INTENDED
|
|
${ARG_UNPARSED_ARGUMENTS})
|
|
llvm_update_compile_flags(${name})
|
|
if(MLIR_BUILD_MLIR_C_DYLIB)
|
|
target_link_libraries(${name} PRIVATE
|
|
MLIR-C)
|
|
else()
|
|
target_link_libraries(${name} PRIVATE
|
|
${ARG_LINK_LIBS})
|
|
endif()
|
|
endfunction(_add_capi_test_executable)
|
|
|
|
# Only enable the ExecutionEngine if the native target is configured in.
|
|
if(TARGET ${LLVM_NATIVE_ARCH})
|
|
_add_capi_test_executable(mlir-capi-execution-engine-test
|
|
execution_engine.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIConversion
|
|
MLIRCAPIExecutionEngine
|
|
MLIRCAPIRegistration
|
|
)
|
|
endif()
|
|
|
|
_add_capi_test_executable(mlir-capi-ir-test
|
|
ir.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPIStandard
|
|
MLIRCAPIRegistration
|
|
)
|
|
|
|
_add_capi_test_executable(mlir-capi-llvm-test
|
|
llvm.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPILLVM
|
|
MLIRCAPIRegistration
|
|
)
|
|
|
|
_add_capi_test_executable(mlir-capi-pass-test
|
|
pass.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPIRegistration
|
|
MLIRCAPITransforms
|
|
)
|
|
|
|
_add_capi_test_executable(mlir-capi-sparse-tensor-test
|
|
sparse_tensor.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPIRegistration
|
|
MLIRCAPISparseTensor
|
|
)
|
|
|
|
_add_capi_test_executable(mlir-capi-quant-test
|
|
quant.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPIRegistration
|
|
MLIRCAPIQuant
|
|
)
|
|
|
|
_add_capi_test_executable(mlir-capi-pdl-test
|
|
pdl.c
|
|
LINK_LIBS PRIVATE
|
|
MLIRCAPIIR
|
|
MLIRCAPIRegistration
|
|
MLIRCAPIPDL
|
|
)
|