diff --git a/MODULE.bazel b/MODULE.bazel index f0dfd80..a52b84e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,6 +8,7 @@ module( bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "bazel_lib", version = "3.1.1") bazel_dep(name = "libarchive", version = "3.8.1.bcr.2") +bazel_dep(name = "xz", version = "5.4.5.bcr.8") # bump xz to build on windows arm64 bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.5.5") bazel_dep(name = "rules_cc", version = "0.2.14") @@ -29,14 +30,6 @@ single_version_override( patch_strip = 1, ) -single_version_override( - module_name = "xz", - patches = [ - "//patches:0004-xz-disable-x86-intrinsics-on-windows-arm64.patch", - ], - patch_strip = 1, -) - ## TESTS http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") diff --git a/patches/0004-xz-disable-x86-intrinsics-on-windows-arm64.patch b/patches/0004-xz-disable-x86-intrinsics-on-windows-arm64.patch deleted file mode 100644 index e12c732..0000000 --- a/patches/0004-xz-disable-x86-intrinsics-on-windows-arm64.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/config.lzma-windows.h b/config.lzma-windows.h -index c0442e5..745b013 100644 ---- a/config.lzma-windows.h -+++ b/config.lzma-windows.h -@@ -155,7 +155,12 @@ - /* #undef HAVE_ICONV */ - - /* Define to 1 if you have the header file. */ --#define HAVE_IMMINTRIN_H 1 -+#if defined(__i386__) || defined(__x86_64__) \ -+ || defined(_M_IX86) || defined(_M_X64) -+# define HAVE_IMMINTRIN_H 1 -+#else -+/* #undef HAVE_IMMINTRIN_H */ -+#endif - - /* Define to 1 if you have the header file. */ - #define HAVE_INTTYPES_H 1 -@@ -294,7 +299,12 @@ - /* #undef HAVE__FUTIME */ - - /* Define to 1 if _mm_movemask_epi8 is available. */ --#define HAVE__MM_MOVEMASK_EPI8 1 -+#if defined(__i386__) || defined(__x86_64__) \ -+ || defined(_M_IX86) || defined(_M_X64) -+# define HAVE__MM_MOVEMASK_EPI8 1 -+#else -+/* #undef HAVE__MM_MOVEMASK_EPI8 */ -+#endif - - /* Define to the sub-directory where libtool stores uninstalled libraries. */ - #define LT_OBJDIR ".libs/"