Skip to content

GH-131296: fix clang-cl warning on Windows in liblzma #131897

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 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PCbuild/liblzma.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
<ClCompile>
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(lzmaDir)windows/vs2019;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4028;4113;4133;4244;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4244;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
Copy link
Member Author

@chris-eibl chris-eibl Mar 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings 4028, 4113 and 4133 are no longer emitted. Tested for ARM, ARM64, Win32 and x64 in Debug and Release configuration for MSVC and clang-cl (except ARM).

Warning 4996 is the deprecation warning, that clang-cl unfortunately does not understand in DisableSpecificWarnings.

<AdditionalOptions Condition="$(PlatformToolset) == 'ClangCL'">%(AdditionalOptions) -Wno-deprecated-declarations</AdditionalOptions>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This disables the warning

tuklib_physmem.c(82,7): warning : 'GetVersion' is deprecated [-Wdeprecated-declarations]

in https://github.com/python/cpython/actions/runs/14136067992/job/39607990169#step:4:168.

</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
Loading