Skip to content

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Sep 5, 2025

  • Explanation:
    This closes a gap in the setup of the build -- while most of the macOS configurations install CMake before hand, this would avoid a hard failure when we forget to do so.
  • Scope:
    Builds on macOS that do not provide a prebuilt CMake before hand.
  • Issues: rdar://159939866
  • Original PRs:
    Build CMake on macOS if one is not preinstalled #81161
  • Risk:
    Low -- this only affects macOS configurations that do not have CMake already in the path, which are a small number of all configurations (since at desk we give clear instructions about installing prerequisites, and on CI we install those automatically).
  • Testing:
    Ensured at desk that on a macOS system with no CMake or ninja in the search path build-script is able to build those and get to the build of LLVM.
  • Reviewers: myself in the original PR done by @MaxDesiatov

We build CMake on all platforms (except Darwin for an unknown reason) if CMake is not preinstalled. Since CMake 4.0 regresses certain build configurations, there's currently no way to build on Darwin without installing an older CMake version 3.x manually. This can be simplified if we build a pinned version of CMake consistently on all platforms.

Addresses rdar://159939866

(cherry picked from commit 7db6c5d)
@edymtt edymtt requested a review from a team as a code owner September 5, 2025 14:30
@edymtt
Copy link
Contributor Author

edymtt commented Sep 5, 2025

@swift-ci please test

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thank you! Would be glad to see this in 6.2 after all 🙂

@edymtt
Copy link
Contributor Author

edymtt commented Sep 5, 2025

@swift-ci please test macOS

@edymtt
Copy link
Contributor Author

edymtt commented Sep 5, 2025

@swift-ci please test macOS Apple Silicon

@shahmishal
Copy link
Member

@swift-ci test

@ghost
Copy link

ghost commented Sep 8, 2025

why not ship cmake as part of the xcode clt? (while we're at it, why not also natively support cmake in xcode?)

@tbkka
Copy link
Contributor

tbkka commented Sep 8, 2025

why not ship cmake as part of the xcode clt? (while we're at it, why not also natively support cmake in Xcode?)

Xcode is an Apple commercial product, not controlled by the Swift open-source project. Suggestions for Xcode improvements should be filed via Apple's feedback assistant.

@ghost
Copy link

ghost commented Sep 8, 2025

oh okay, but i can see y'all work at apple on your profiles? can't you or someone else here just talk with your fellow xcode teammates to see if they can/want to both start shipping and supporting cmake in xcode?

@edymtt edymtt merged commit 90ee097 into swiftlang:release/6.2 Sep 9, 2025
5 checks passed
@edymtt edymtt deleted the edymtt/build-cmake-if-unavailable-on-macos-6.2 branch September 9, 2025 05:36
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.

5 participants