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

SCons: fix #1672 Incorrect compiler detection in msystem based environments #1692

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

enetheru
Copy link
Contributor

As described in issue #1672 msys2 environments don't use a mingw prefix for their compiler binaries.

This patch detects MSYSTEM environment variable detects compilers directly

@enetheru
Copy link
Contributor Author

While this works for me, I dont think it is necessarily the best approach. If you are in an msystem environment shell it can reasonably be assumed you want to compile using whatever the compiler is within that shell. so passing use_mingw=yes or use_llvm=yes feels like a bad hacky holdover from previous code.

I think this might run afoul of needing the godot and godot-cpp build systems to be similar.

I quickly updated godot master and checked and within a msys2.clang64 environment it tries to use cl. and i need to pass use_mingw=yes, and then it detects clang. So same issues.

So to get this solved "properly" I think I have to go submit a proposal to godot to get it changed there too, and that will in turn flow down here?

@dsnopek what would you advise?

@enetheru enetheru force-pushed the msys2-clang64 branch 3 times, most recently from 5cf70a3 to 4996bcf Compare February 3, 2025 22:39
As described in issue godotengine#1672 msys2 environments don't use a mingw prefix for their compiler binaries.

this patch detects MSYSTEM environment variable detects compilers directly
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