Skip to content

[lldb][cmake] Error out when building debugserver with CMake 4 #10704

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

Conversation

chelcassanova
Copy link

CMake 4 no longer sets the CMAKE_OSX_SYSROOT variable by default. If you've updated to CMake 4 on macOS (e.g. with brew) and try building LLDB with CMake/ninja, this will yield an error when building debugserver that clang is unable to run since it tries to compile files that don't exist.

These files are supposed to be generated by the mig process. mig needs the CMAKE_OSX_SYSROOT variable in order to work and without it, it silently fails to generate the files that later on need to be compiled.

This commit sets this SDK path for mig and will fatal error out of config when building debugserver without having set CMAKE_OSX_SYSROOT.

(cherry picked from commit f6f7c91)

CMake 4 no longer sets the `CMAKE_OSX_SYSROOT` variable by default. If
you've updated to CMake 4 on macOS (e.g. with brew) and try building LLDB with
CMake/ninja, this will yield an error when building debugserver that
clang is unable to run since it tries to compile files that don't exist.

These files are supposed to be generated by the `mig` process. `mig`
needs the `CMAKE_OSX_SYSROOT` variable in order to work and without it,
it silently fails to generate the files that later on need to be
compiled.

This commit sets this SDK path for mig and will fatal error out of config
when building debugserver without having set CMAKE_OSX_SYSROOT.

(cherry picked from commit f6f7c91)
@chelcassanova chelcassanova requested a review from a team as a code owner May 19, 2025 17:31
@chelcassanova
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere merged commit cc5733a into swiftlang:swift/release/6.2 May 21, 2025
3 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.

2 participants