Skip to content

logs: fix mingw-like builds (fixes #2898) #2911

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 5 commits into from
Sep 1, 2023

Conversation

staviq
Copy link
Contributor

@staviq staviq commented Aug 30, 2023

Fixes #2898

Using _WIN32 does not work with mingw and similar build environments, and check for __MINGW32__ is necessary in that case. Better and simpler Windows detection via _MSC_VER.

If mingw/msys like build environments are supported, this should probably get fixed in other parts of the project too, because currently it produces compile warnings.

Edit:
Fixes #2940 too.

@cebtenzzre
Copy link
Collaborator

I think you want the _MSC_VER macro - that's how you identify MSVC.

@cebtenzzre
Copy link
Collaborator

What I mean is, instead of checking for Windows or MinGW or using this LOG_COMPAT macro, just check for MSVC. It's a compiler problem, not an OS problem - _WIN32 has nothing to do with it, and the code shouldn't care whether it's gcc on Linux or Windows.

@staviq
Copy link
Contributor Author

staviq commented Aug 31, 2023

@cebtenzzre should I add fix for #2940 here ? It's quite simple.

@cebtenzzre
Copy link
Collaborator

should I add fix for #2940 here ?

Sure, why not. I independently discovered and fixed that in #2886, but this might get merged first.

@ggerganov ggerganov merged commit 4dcd47d into ggml-org:master Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants