Skip to content

Commit 3f110a5

Browse files
committed
GH-130213: blake2module.c needs to "see" the AVX intrinsics during compiling
1 parent 30e8924 commit 3f110a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

PCbuild/pythoncore.vcxproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@
420420
<ClCompile Include="..\Modules\blake2module.c">
421421
<PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD128;%(PreprocessorDefinitions)</PreprocessorDefinitions>
422422
<PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD256;%(PreprocessorDefinitions)</PreprocessorDefinitions>
423+
<!-- GH-130213: blake2module.c needs to "see" the AVX intrinsics during compiling -->
424+
<AdditionalOptions Condition="'$(Platform)' == 'x64' and $(PlatformToolset) == 'ClangCL' and '$(LLVMToolsVersion)' &lt; '19'">/arch:AVX</AdditionalOptions>
423425
</ClCompile>
424426
<ClCompile Include="..\Modules\_codecsmodule.c" />
425427
<ClCompile Include="..\Modules\_collectionsmodule.c" />
@@ -742,6 +744,13 @@
742744
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'">
743745
<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
744746
</Target>
747+
<Target Name="_WarnAboutTooOldClang" BeforeTargets="PrepareForBuild" Condition="'$(Platform)' == 'x64' and $(PlatformToolset) == 'ClangCL' and '$(LLVMToolsVersion)' &lt; '19'">
748+
<!-- GH-130213: blake2module.c needs to just "see" the AVX intrinsics during compiling.
749+
But older clangs only make them visible, if they are compiling
750+
for an architecture that supports them.
751+
-->
752+
<Warning Text="built executable requires AVX and may not run everywhere" />
753+
</Target>
745754
<Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)">
746755
<Warning Text="Not including zlib is not a supported configuration." />
747756
</Target>

0 commit comments

Comments
 (0)