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: Add optional detect.py get_tools method to let platforms register custom tools #99762

Closed

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Nov 27, 2024

This helps move this logic out of SConstruct, keeping platforms more self contained, and helping thirdparty platforms define their own custom tools.

This logic was also unreliable (the use_mingw one would only work if passed manually on the command line, not in e.g. get_flags or custom.py).

Draft for now as this requires some testing on affected platforms, and validation of the use case I have in W4 for thirdparty platforms setting their own tools.

Our overall set of custom tools registered for first-party platforms is something that might be worth reviewing over time. The Windows mingw stuff is still pretty hacky, and there's a stray env.Tools("msvc") for Windows which we might want to do differently. And some platforms override CC, CXX, etc. manually when we might be able to rely on pre-existing SCons tools to do it properly. As always, such changes have a high risk of regression though so we'd need to be careful with testing.

@akien-mga
Copy link
Member Author

This logic was also unreliable (the use_mingw one would only work if passed manually on the command line, not in e.g. get_flags).

I'm not actually fixing this here btw, the same check is moved to platform/windows/detect.py's get_tools.

…egister custom tools

This helps move this logic out of SConstruct, keeping platforms more self
contained, and helping thirdparty platforms define their own custom tools.

This logic was also unreliable (the `use_mingw` one would only work if
passed manually on the command line, not in e.g. `get_flags`).
@akien-mga akien-mga force-pushed the scons-platform-custom-tools branch from 5df3f0d to 65034f1 Compare January 17, 2025 23:19
@akien-mga
Copy link
Member Author

Superseded by #101726.

@akien-mga akien-mga closed this Jan 30, 2025
@akien-mga akien-mga removed this from the 4.x milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant