Skip to content

Add check for __clang__ in lone _MSC_VER checks #66

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nashiora
Copy link

@nashiora nashiora commented May 5, 2025

The nob_cc_flags and nob_cc_output macros check for _MSC_VER to provide MSVC-specific argument syntax. When using Clang on Windows it provides many of the same flags as MSVC, presumably for Windows compat, so Nob was generating MSVC flags for a Clang compiler call.

This is not an issue in other locations as __clang__ is checked for explicitly and before _MSC_VER, such as in the related nob_cc macro for selecting the appropriate compiler program name.

@nashiora nashiora changed the title Add check for __clang__ in lone _MSV_VER checks Add check for __clang__ in lone _MSC_VER checks May 5, 2025
@nashiora
Copy link
Author

nashiora commented May 5, 2025

Yes I know these are trivial to re-define on your own, but IMO the default behavior should be correct.

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.

1 participant