Fix Transform cmake (#111)

* target_link_libraries(OMElideKrnlGlobalConstants ...) adds duplicated
../lib/libOMKrnlOps.a ../lib/libOMONNXOps.a at end of linkage for onnx-mlir
and breaks shared library build

* Fix .buildbot/z13.sh to prepare for zLinux Jenkins build bot

Co-authored-by: Gong Su <gong_su@hotmail.com>
This commit is contained in:
Tian Jin 2020-05-07 00:11:04 +08:00 committed by GitHub
parent f5f336db08
commit 922b6b6c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 24 deletions

0
.buildbot/p9.sh Normal file → Executable file
View File

38
.buildbot/z13.sh Normal file → Executable file
View File

@ -15,29 +15,23 @@ if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
fi
# Set up mock installation path:
export INSTALL_PATH=$WORKSPACE/INSTALL_PATH
mkdir -p $INSTALL_PATH
export PATH=$INSTALL_PATH/bin:$PATH
export LD_LIBRARY_PATH=$INSTALL_PATH/lib:$INSTALL_PATH/lib64:$LD_LIBRARY_PATH
export CPATH=$INSTALL_PATH/include:$CPATH
export INSTALL_PATH=${WORKSPACE}/INSTALL_PATH
mkdir -p ${INSTALL_PATH}
export PATH=${INSTALL_PATH}/bin:${PATH}
export LD_LIBRARY_PATH=${INSTALL_PATH}/lib:${INSTALL_PATH}/lib64:${LD_LIBRARY_PATH}
export CPATH=${INSTALL_PATH}/include:${CPATH}
# Set up project specific environment variables:
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar:$CLASSPATH
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export BUILD_PATH=$(pwd)
export CPATH=$(pwd)/../runtime/
export PATH=${JAVA_HOME}/bin:${PATH}
export CLASSPATH=.:${JAVA_HOME}/lib:${JAVA_HOME}/lib/tools.jar:${CLASSPATH}
mkdir build && cd build
cmake -DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \
-DONNX_MLIR_ENABLE_NODE_TEST_JAVA=ON \
-DONNX_MLIR_ENABLE_NODE_TEST_JNI=ON \
-DONNX_MLIR_ENABLE_NODE_TEST_CPP=OFF \
-DONNX_MLIR_TARGET_ARCH=z13 ..
export BUILD_PATH=build-against-$(basename ${LLVM_PROJECT_ROOT})
mkdir ${BUILD_PATH} && cd ${BUILD_PATH}
make -j "$(nproc)" install
ctest -j "$(nproc)"
LLVM_PROJ_SRC=${LLVM_PROJECT_ROOT} \
LLVM_PROJ_BUILD=${LLVM_PROJECT_ROOT}/build \
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} .. \
make -j$(nproc) onnx-mlir
make -j$(nproc) check-onnx-lit
make -j$(nproc) check-onnx-backend

View File

@ -31,8 +31,7 @@ target_include_directories(OMElideKrnlGlobalConstants
${ONNX_MLIR_SRC_ROOT}
${ONNX_MLIR_BIN_ROOT}
${ONNX_MLIR_SRC_ROOT})
target_link_libraries(OMElideKrnlGlobalConstants
${MLIRLibs}
add_dependencies(OMElideKrnlGlobalConstants
OMKrnlOps
OMONNXOps)