Merge pull request #4286 from facebook/visual_clang_avx2

Fix Visual + ClangCL + AVX2 compilation
This commit is contained in:
Yann Collet
2025-02-05 15:30:51 -08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -362,6 +362,8 @@ jobs:
- generator: "MinGW Makefiles"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL -A x64 -DCMAKE_C_FLAGS=/arch:AVX2"
runs-on: windows-2022
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
+2 -2
View File
@@ -302,10 +302,10 @@ MEM_STATIC int ZSTD_isPower2(size_t u) {
#ifndef ZSTD_ALIGNED
/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */
# if defined(__GNUC__)
# if defined(__GNUC__) || defined(__clang__)
# define ZSTD_ALIGNED(a) __attribute__((aligned(a)))
# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
# define ZSTD_ALIGNED(a) alignas(a)
# define ZSTD_ALIGNED(a) _Alignas(a)
#elif defined(_MSC_VER)
# define ZSTD_ALIGNED(n) __declspec(align(n))
# else