diff --git a/config.cmake b/config.cmake index e98e87c..eae1338 100644 --- a/config.cmake +++ b/config.cmake @@ -133,9 +133,13 @@ set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "") set(LLVM_ENABLE_ZSTD OFF CACHE BOOL "") set(LLVM_FORCE_ENABLE_STATS ON CACHE BOOL "") -# diverges from iree because of weird linking problems in mlir_float16 utils and etc -set(LLVM_BUILD_LLVM_DYLIB OFF CACHE BOOL "") -set(LLVM_LINK_LLVM_DYLIB OFF CACHE BOOL "") +set(LLVM_BUILD_LLVM_DYLIB ON CACHE BOOL "") +# All the tools will use libllvm shared library +# (but doesn't work on windows or aarch64) +if(NOT WIN32 AND NOT ARCH STREQUAL "AArch64") + set(LLVM_LINK_LLVM_DYLIB ON CACHE BOOL "") + set(MLIR_LINK_MLIR_DYLIB ON CACHE BOOL "") +endif() set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "") diff --git a/scripts/pip_install_mlir.sh b/scripts/pip_install_mlir.sh index aa57c72..4e3c879 100755 --- a/scripts/pip_install_mlir.sh +++ b/scripts/pip_install_mlir.sh @@ -24,9 +24,9 @@ else fi if [ x"$CIBW_ARCHS" == x"arm64" ] || [ x"$CIBW_ARCHS" == x"aarch64" ]; then - if [ x"$MATRIX_OS" == x"macos-13" ] && [ x"$CIBW_ARCHS" == x"arm64" ]; then + if [ x"$MATRIX_OS" == x"macos-13" ] || [ x"$MATRIX_OS" == x"macos-13" ]; then PLAT=macosx_12_0_arm64 - elif [ x"$MATRIX_OS" == x"ubuntu-20.04" ] && [ x"$CIBW_ARCHS" == x"aarch64" ]; then + elif [ x"$MATRIX_OS" == x"ubuntu-20.04" ]; then PLAT=linux_aarch64 fi pip install mlir$MLIR_WHEEL_VERSION --platform $PLAT --only-binary=:all: --target $SITE_PACKAGES --no-deps --force -U