Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
GH-130213: clang-cl: blake2module.c needs to "see" the AVX intrinsics during compiling#130447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -420,6 +420,8 @@ | ||
| <ClCompile Include="..\Modules\blake2module.c"> | ||
| <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD128;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD256;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| <!-- GH-130213: blake2module.c needs to "see" the AVX intrinsics during compiling --> | ||
| <AdditionalOptions Condition="'$(Platform)' == 'x64' and $(PlatformToolset) == 'ClangCL' and '$(LLVMToolsVersion)' < '19'">/arch:AVX</AdditionalOptions> | ||
| </ClCompile> | ||
| <ClCompile Include="..\Modules\_codecsmodule.c" /> | ||
| <ClCompile Include="..\Modules\_collectionsmodule.c" /> | ||
| @@ -742,6 +744,13 @@ | ||
| <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'"> | ||
| <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." /> | ||
| </Target> | ||
| <Target Name="_WarnAboutTooOldClang" BeforeTargets="PrepareForBuild" Condition="'$(Platform)' == 'x64' and $(PlatformToolset) == 'ClangCL' and '$(LLVMToolsVersion)' < '19'"> | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be a little less reliable, but doing the comparison with We probably also need to put the setting (and warning) in pyproject.props, to make sure that any use in any extension modules is also handled. In general, everything that applies to pythoncore.vcxproj also applies to extension modules, which is why most of the settings are in the shared file.
| ||
| <!-- GH-130213: blake2module.c needs to just "see" the AVX intrinsics during compiling. | ||
| But older clangs only make them visible, if they are compiling | ||
| for an architecture that supports them. | ||
| --> | ||
| <Warning Text="built executable requires AVX and may not run everywhere" /> | ||
| </Target> | ||
| <Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)"> | ||
| <Warning Text="Not including zlib is not a supported configuration." /> | ||
| </Target> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use
PrepareForClangClBuildhere like @zooba suggested, which would have saved the extra$(PlatformToolset) == 'ClangCL', but unfortunately this did not work.