From 74dcc3f9fc0c24fb2a2da4c89e4af12da34b8646 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 10 Jan 2025 14:06:02 -0500 Subject: [PATCH 1/4] Update config.cmake --- config.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config.cmake b/config.cmake index e98e87c..ec03d8e 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) +if (NOT WIN32) + 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 "") From 5fc55443abaa8b5426de63449cde603577359752 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 10 Jan 2025 19:42:10 -0500 Subject: [PATCH 2/4] Update config.cmake --- config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.cmake b/config.cmake index ec03d8e..9ee3510 100644 --- a/config.cmake +++ b/config.cmake @@ -135,8 +135,8 @@ set(LLVM_FORCE_ENABLE_STATS ON CACHE BOOL "") set(LLVM_BUILD_LLVM_DYLIB ON CACHE BOOL "") # All the tools will use libllvm shared library -# (but doesn't work on windows) -if (NOT WIN32) +# (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() From 94cd5cfdb2154947895a823b78436e721738dea9 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Fri, 10 Jan 2025 20:23:23 -0500 Subject: [PATCH 3/4] Update config.cmake --- config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.cmake b/config.cmake index 9ee3510..eae1338 100644 --- a/config.cmake +++ b/config.cmake @@ -136,7 +136,7 @@ set(LLVM_FORCE_ENABLE_STATS ON 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") +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() From 7cdf9eac3fcd1e2d7826c3fa14d54845926c6742 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sat, 1 Feb 2025 10:02:23 -0500 Subject: [PATCH 4/4] Update pip_install_mlir.sh --- scripts/pip_install_mlir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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