Merge pull request #4286 from facebook/visual_clang_avx2
Fix Visual + ClangCL + AVX2 compilation
This commit is contained in:
@@ -362,6 +362,8 @@ jobs:
|
|||||||
- generator: "MinGW Makefiles"
|
- generator: "MinGW Makefiles"
|
||||||
- generator: "Visual Studio 17 2022"
|
- generator: "Visual Studio 17 2022"
|
||||||
flags: "-T ClangCL"
|
flags: "-T ClangCL"
|
||||||
|
- generator: "Visual Studio 17 2022"
|
||||||
|
flags: "-T ClangCL -A x64 -DCMAKE_C_FLAGS=/arch:AVX2"
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
|
||||||
|
|||||||
@@ -302,10 +302,10 @@ MEM_STATIC int ZSTD_isPower2(size_t u) {
|
|||||||
|
|
||||||
#ifndef ZSTD_ALIGNED
|
#ifndef ZSTD_ALIGNED
|
||||||
/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */
|
/* 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)))
|
# define ZSTD_ALIGNED(a) __attribute__((aligned(a)))
|
||||||
# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
|
# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
|
||||||
# define ZSTD_ALIGNED(a) alignas(a)
|
# define ZSTD_ALIGNED(a) _Alignas(a)
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
# define ZSTD_ALIGNED(n) __declspec(align(n))
|
# define ZSTD_ALIGNED(n) __declspec(align(n))
|
||||||
# else
|
# else
|
||||||
|
|||||||
Reference in New Issue
Block a user