Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bazel-*
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PLATFORMS = [
"@toolchains_llvm_bootstrapped//platforms:linux_amd64_musl",
"@toolchains_llvm_bootstrapped//platforms:linux_arm64_musl",
"@toolchains_llvm_bootstrapped//platforms:windows_amd64",
"@toolchains_llvm_bootstrapped//platforms:windows_arm64",
]

config_setting(
Expand Down
17 changes: 9 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +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 = "toolchains_llvm_bootstrapped", version = "0.5.2")
bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.5.5")
bazel_dep(name = "rules_cc", version = "0.2.14")

bazel_dep(name = "bazel_skylib", version = "1.9.0", dev_dependency = True)
Expand All @@ -29,6 +29,14 @@ 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")
Expand All @@ -46,10 +54,3 @@ http_file(
downloaded_file_path = "product.pkg",
sha256 = "50b709f72cb5ed87d5882901923face981dd657569717761832c36db3bf08238",
)

archive_override(
module_name = "toolchains_llvm_bootstrapped",
urls = ["https://github.com/cerisier/toolchains_llvm_bootstrapped/archive/9799c1d0d976409451bbe5275e8d3d607e442956.tar.gz"],
strip_prefix = "toolchains_llvm_bootstrapped-9799c1d0d976409451bbe5275e8d3d607e442956",
integrity = "sha256-SJuGXePryLXuDemHsvfajLFMHT+vonxstVddkJlhbrg=",
)
32 changes: 32 additions & 0 deletions patches/0004-xz-disable-x86-intrinsics-on-windows-arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 <immintrin.h> 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 <inttypes.h> 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/"
Loading