Merge pull request #22015 from vnen/uwp-arm-zstd
Patch zstd to build for UWP ARM
This commit is contained in:
commit
afb486e7c9
3 changed files with 16 additions and 1 deletions
2
thirdparty/README.md
vendored
2
thirdparty/README.md
vendored
|
@ -525,3 +525,5 @@ Files extracted from upstream source:
|
|||
|
||||
- lib/{common/,compress/,decompress/,zstd.h}
|
||||
- LICENSE
|
||||
|
||||
- Applied the patch in `thirdparty/zstd/1314.diff` (PR 1314 upstream, already merged). Needed to build on UWP ARM. Can be removed when a new version is released with the patch.
|
||||
|
|
13
thirdparty/zstd/1314.diff
vendored
Normal file
13
thirdparty/zstd/1314.diff
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/common/cpu.h b/common/cpu.h
|
||||
index 88e0ebf44..eeb428ad5 100644
|
||||
--- a/common/cpu.h
|
||||
+++ b/common/cpu.h
|
||||
@@ -36,7 +36,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) {
|
||||
U32 f1d = 0;
|
||||
U32 f7b = 0;
|
||||
U32 f7c = 0;
|
||||
-#ifdef _MSC_VER
|
||||
+#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
|
||||
int reg[4];
|
||||
__cpuid((int*)reg, 0);
|
||||
{
|
2
thirdparty/zstd/common/cpu.h
vendored
2
thirdparty/zstd/common/cpu.h
vendored
|
@ -36,7 +36,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) {
|
|||
U32 f1d = 0;
|
||||
U32 f7b = 0;
|
||||
U32 f7c = 0;
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
|
||||
int reg[4];
|
||||
__cpuid((int*)reg, 0);
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue