Fix check-onnx-backend build on x86 Linux. (#91)
This commit is contained in:
parent
46ef7996f7
commit
72de6eb004
|
@ -62,7 +62,7 @@ function(find_mlir_lib lib)
|
|||
PATHS ${LLVM_PROJECT_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
if(${${lib}} STREQUAL ${lib}-NOTFOUND)
|
||||
message(FATAL_ERROR "${lib} not found")
|
||||
message(FATAL_ERROR "${lib} not found, did you forget to build llvm-project?")
|
||||
endif()
|
||||
endfunction(find_mlir_lib)
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
add_library(cruntime
|
||||
# Create shared libcruntime.so since model.so linkage for backend tests
|
||||
# will fail on x86 Linux if cruntime is statically linked.
|
||||
add_library(cruntime SHARED
|
||||
DynMemRef.cpp
|
||||
DynMemRef.h
|
||||
DataType.h)
|
||||
|
|
|
@ -3,7 +3,7 @@ configure_file(test_config.py.in test_config.py)
|
|||
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
add_custom_target(check-onnx-backend
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
COMMAND LD_PRELOAD=${CMAKE_BINARY_DIR}/lib/libcruntime.so ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test.py)
|
||||
|
||||
add_dependencies(check-onnx-backend onnx-mlir)
|
||||
|
|
Loading…
Reference in New Issue