diff options
-rw-r--r-- | contrib/meson/meson/meson.build | 9 | ||||
-rw-r--r-- | lib/lz4.c | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/contrib/meson/meson/meson.build b/contrib/meson/meson/meson.build index b278b7c..2cfd48c 100644 --- a/contrib/meson/meson/meson.build +++ b/contrib/meson/meson/meson.build @@ -28,13 +28,8 @@ lz4_version = meson.project_version() lz4_h_file = join_paths(meson.current_source_dir(), '../../../lib/lz4.h') GetLz4LibraryVersion_py = find_program('GetLz4LibraryVersion.py', native : true) -r = run_command(GetLz4LibraryVersion_py, lz4_h_file) -if r.returncode() == 0 - lz4_version = r.stdout().strip() - message('Project version is now: @0@'.format(lz4_version)) -else - error('Cannot find project version in @0@'.format(lz4_h_file)) -endif +lz4_version = run_command(GetLz4LibraryVersion_py, lz4_h_file, check: true).stdout().strip() +message('Project version is now: @0@'.format(lz4_version)) lz4_libversion = lz4_version @@ -517,7 +517,12 @@ static unsigned LZ4_NbCommonBytes (reg_t val) assert(val != 0); if (LZ4_isLittleEndian()) { if (sizeof(val) == 8) { -# if defined(_MSC_VER) && (_MSC_VER >= 1800) && defined(_M_AMD64) && !defined(LZ4_FORCE_SW_BITCOUNT) +# if defined(_MSC_VER) && (_MSC_VER >= 1800) && (defined(_M_AMD64) && !defined(_M_ARM64EC)) && !defined(LZ4_FORCE_SW_BITCOUNT) +/*-************************************************************************************************* +* ARM64EC is a Microsoft-designed ARM64 ABI compatible with AMD64 applications on ARM64 Windows 11. +* The ARM64EC ABI does not support AVX/AVX2/AVX512 instructions, nor their relevant intrinsics +* including _tzcnt_u64. Therefore, we need to neuter the _tzcnt_u64 code path for ARM64EC. +****************************************************************************************************/ # if defined(__clang__) && (__clang_major__ < 10) /* Avoid undefined clang-cl intrinics issue. * See https://github.com/lz4/lz4/pull/1017 for details. */ |