-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 get_mingw_tool
regression
#91734
Conversation
676b764
to
020c018
Compare
020c018
to
9ef4470
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's becoming a bit convoluted, but if it fixes the issue, seems fine.
Seems this doesn't fix #91710
|
Oh wow, so you're experiencing a different issue than what I was able to replicate; it must be very specific to |
Try running it with I was thinking it's the issue with MSYS2 paths, but now I am not sure since there's |
|
Strange, seems like output is the same, I was expecting it to print full commands. Maybe it only works if it's added before |
Ah, right. So:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only differences from the logic before #85319 I see, it was not using try_cmd
for windres
and was doing if len(out[1]):
on the windres
output and retrying without prefix, this is probably intentional, but I do not remember why.
So it's possible that there are multiple copiers of windres
and only some of them work, support different set or architectures for example (but all might run with --version
only).
Or it's possible that some version of windres
does not respond to --version
or return non-zero exit code.
I would probably consider reverting #85319, there's no benefit to this change beside code readability, and with newly added unclear env
checks and addition of the prefix to PATH, I think it's now less readable that it was before #85319.
I agree, let's revert to the previous state for now, and maybe reconsider in a new PR how to improve this code's readability and maintainability without regressions. Superseded by #91751. |
Closes #91710
get_mingw_tool
was refactored to take SConsEnvironment as an optional argument. It only looks for a prefixed executable when checking if Windows is a supported platform, ensuring no false positives. If Windows is supported & selected for building, themingw_prefix
bin folder is prepended to the SCons Environment's path.