Skip to content
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

Add advapi32.lib back as a mingw dep. #1653

Closed
wants to merge 1 commit into from

Conversation

vrabaud
Copy link
Collaborator

@vrabaud vrabaud commented Oct 4, 2023

No description provided.

Copy link
Collaborator

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks. Please wait for Frankie's report back (#1649 (comment)).

@kmilos
Copy link
Contributor

kmilos commented Oct 4, 2023

Why is there a need to list these explicitly on Windows? AFAIK, they should be included by CMake on all Windows toolchains (MSVC, and MingGW both GCC and Clang) by default: https://gitlab.kitware.com/search?search=advapi32&nav_source=navbar&project_id=541&group_id=415&search_code=true&repository_ref=master

@fdintino
Copy link
Contributor

fdintino commented Oct 5, 2023

We can close this pull request. It was indeed an issue with the rav1e release, one that is fixed in the recent weekly prereleases.

@kmilos On a fresh windows image with vs2022, my CMAKE_C_STANDARD_LIBRARIES_INIT is:

advapi32.lib comdlg32.lib gdi32.lib kernel32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib winspool.lib

whereas with rustc --print native-static-libs foo.rs I see these libraries (those not found in CMAKE_C_STANDARD_LIBRARIES_INIT are bolded):

advapi32.lib bcrypt.lib kernel32.lib msvcrt.lib ntdll.lib userenv.lib ws2_32.lib

msvcrt.lib is always a compile-time dependency with msvc, which leaves the four libraries added here to AVIF_PLATFORM_LIBRARIES

@vrabaud
Copy link
Collaborator Author

vrabaud commented Oct 5, 2023

Thx for checking @fdintino !

@vrabaud vrabaud closed this Oct 5, 2023
@vrabaud vrabaud deleted the no_discard branch October 5, 2023 11:55
@wantehchang
Copy link
Collaborator

Thank you, Frankie. I believe we came up with the four libraries added to AVIF_PLATFORM_LIBRARIES by trial and error. It's good to know why exactly those four are needed. (I only looked into why ntdll.lib was needed before because that is not commonly used for this kind of code.)

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.

4 participants