Skip to content

fix(build): fix building AVX-512 runtime dispatch code with Clang/MSVC - #358

Merged
aous72 merged 1 commit into
aous72:masterfrom
solbjorn:avx512-clang-cl
Aug 25, 2026
Merged

fix(build): fix building AVX-512 runtime dispatch code with Clang/MSVC#358
aous72 merged 1 commit into
aous72:masterfrom
solbjorn:avx512-clang-cl

Conversation

@solbjorn

Copy link
Copy Markdown
Contributor

On certain setups, for example, FullLTO, MSVC-style architecture / instruction set flags are not enough for Clang/MSVC (clang-cl). Pass more fine-grained GNU-style arch / IS flags to Clang under MSVC, which are still accepted directly and resolve such issues.

Closes #326

On certain setups, for example, FullLTO, MSVC-style architecture /
instruction set flags are not enough for Clang/MSVC (clang-cl).
Pass more fine-grained GNU-style arch / IS flags to Clang under
MSVC, which are still accepted directly and resolve such issues.

Closes #326

Signed-off-by: Alexander Lobakin <alobakin@mailbox.org>
@aous72

aous72 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Hi Alexander,

Thank you for this PR; let's see if other people are fine with it.
It might be worthwhile for you to put a bug report to clang-cl people.

Kind regards,
Aous.

@aous72
aous72 merged commit 69f3321 into aous72:master Aug 25, 2026
22 checks passed
@solbjorn

Copy link
Copy Markdown
Contributor Author

@aous72, it's not a Clang/clang-cl issue -- with MSVC-style flags, you only have a basic IS flags like AVX-512 etc, there's no fine-grained switches. So most projects with runtime dispatch always pass GNU-style IS switches if the compiler is Clang, like I did in this PR.

@aous72

aous72 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

@solbjorn My view is that clang-cl claims to be compatible with cl.exe.
Passing /arch:AVX512 to clang-cl does not produce the same effect of passing it to cl.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building with ClangCL/MSVC for x86_64 fails with the default configuration

2 participants