-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-91349: Replace zlib with zlib-ng in Windows build #131438
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
de56164
gh-91349: Replace zlib with zlib-ng in Windows build
zooba 1347c50
Updated readme.txt
zooba 7fd8f26
Fix includes for PGO build
zooba f919749
Use correct include dirs
zooba fb6500d
Add NEWS
zooba 89d44a1
Fix debug reference and some warnings
zooba 08eecb1
Exclude Intel optimizations better on ARM64
zooba 548daa7
Update docs and whatsnew
zooba f108044
Remove unresolved reference from docs
zooba 085fa10
Include ZLIBNG_VERSION in pythoninfo
zooba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Exclude Intel optimizations better on ARM64
- Loading branch information
commit 08eecb1540b55a8da6074c53a2f2d0e01e9844bd
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,9 +94,10 @@ | |
<LanguageStandard_C>stdc11</LanguageStandard_C> | ||
<PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
<AdditionalIncludeDirectories>$(zlibNgDir);$(PySourceDir)PC;$(GeneratedZlibNgDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<PreprocessorDefinitions>%(PreprocessorDefinitions);ZLIB_COMPAT;WITH_GZFILEOP;NO_FSEEKO;HAVE_BUILTIN_ASSUME_ALIGNED;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;X86_FEATURES;X86_HAVE_XSAVE_INTRIN;X86_SSE2;X86_SSSE3;X86_SSE42;X86_PCLMULQDQ_CRC;X86_AVX2;X86_AVX512;X86_AVX512VNNI;X86_VPCLMULQDQ_CRC</PreprocessorDefinitions> | ||
<PreprocessorDefinitions>%(PreprocessorDefinitions);ZLIB_COMPAT;WITH_GZFILEOP;NO_FSEEKO;HAVE_BUILTIN_ASSUME_ALIGNED;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;</PreprocessorDefinitions> | ||
<PreprocessorDefinitions Condition="$(Platform) == 'Win32' or $(Platform) == 'x64'">%(PreprocessorDefinitions);X86_FEATURES;X86_HAVE_XSAVE_INTRIN;X86_SSE2;X86_SSSE3;X86_SSE42;X86_PCLMULQDQ_CRC;X86_AVX2;X86_AVX512;X86_AVX512VNNI;X86_VPCLMULQDQ_CRC</PreprocessorDefinitions> | ||
<PreprocessorDefinitions Condition="$(Configuration) == 'Debug'">%(PreprocessorDefinitions);ZLIB_DEBUG</PreprocessorDefinitions> | ||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet> | ||
<EnableEnhancedInstructionSet Condition="$(Platform) == 'Win32' or $(Platform) == 'x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet> | ||
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. Unconditionally letting the compiler generate code up to AVX2 for all |
||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
|
@@ -130,9 +131,11 @@ | |
<ClCompile Include="$(zlibNgDir)\zutil.c" /> | ||
<ClCompile Include="$(zlibNgDir)\cpu_features.c" /> | ||
<ClInclude Include="$(zlibNgDir)\arch\generic\generic_functions.h" /> | ||
<ClInclude Include="$(zlibNgDir)\fallback_builtins.h" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="$(Platform) == 'Win32' or $(Platform) == 'x64'"> | ||
<ClInclude Include="$(zlibNgDir)\arch\x86\x86_functions.h" /> | ||
<ClInclude Include="$(zlibNgDir)\arch\x86\x86_features.h" /> | ||
<ClInclude Include="$(zlibNgDir)\fallback_builtins.h" /> | ||
<ClInclude Include="$(zlibNgDir)\arch\x86\adler32_avx512_p.h" /> | ||
<ClCompile Include="$(zlibNgDir)\arch\x86\x86_features.c" /> | ||
<ClCompile Include="$(zlibNgDir)\arch\x86\chunkset_sse2.c" /> | ||
|
@@ -150,6 +153,8 @@ | |
<ClCompile Include="$(zlibNgDir)\arch\x86\chunkset_avx512.c" /> | ||
<ClCompile Include="$(zlibNgDir)\arch\x86\adler32_avx512_vnni.c" /> | ||
<ClCompile Include="$(zlibNgDir)\arch\x86\crc32_vpclmulqdq.c" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="..\PC\zconf.h" /> | ||
<ClInclude Include="..\PC\zlib.h" /> | ||
<ClInclude Include="$(zlibNgDir)\arch\generic\chunk_permute_table.h" /> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this mean that for all executables X86_AVX512 code will be emitted and used?
See e.g.
adler32_avx512.c
, where the whole file is guarded withX86_AVX512
and there is code like__m512i
in it.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 believe it's detected and called dynamically based on availability, but it's all compiled at compile time.
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.
Yeah, I hope so, too.