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

[CMake] use same generator for compiler and stdlib builds #78402

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Jan 2, 2025

This will support configurations where ninja is not the search path, and will avoid problems that can arise from the stdlib build detecting and using a different generator.

Addresses rdar://142268599

This will  support configurations where ninja is not the search path,
and will avoid problems that can arise from the stdlib build detecting
and using a different generator.

Addresses rdar://142268599
@edymtt
Copy link
Contributor Author

edymtt commented Jan 2, 2025

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the CMAKE_GENERATOR is implicitly set to the same one, so this should be sufficient.

@edymtt
Copy link
Contributor Author

edymtt commented Jan 2, 2025

According to the Cmake documentation, it seems it is the other way around -- that is, if not set explicitly CMAKE_MAKE_PROGRAM is set to the value of CMAKE_GENERATOR.

This seems to be corroborated by what I experienced at desk when trying to build without having ninja in my search path -- CMAKE_GENERATOR=ninja was inherited from the "parent project", but CMAKE_MAKE_PROGRAM=<path to local ninja build> was not and thus was set to the same value as CMAKE_GENERATOR, and this caused the configuration of the standalone stdlib to fail

@edymtt edymtt merged commit 93eb973 into swiftlang:main Jan 2, 2025
5 checks passed
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.

3 participants