llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Chelsea Cassanova (chelcassanova) <details> <summary>Changes</summary> 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 will fatal error out of config when building debugserver without having set CMAKE_OSX_SYSROOT. --- Full diff: https://github.com/llvm/llvm-project/pull/138020.diff 1 Files Affected: - (modified) lldb/tools/debugserver/source/CMakeLists.txt (+4) ``````````diff diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt index 1a433898f6aa4..45b16c74f5197 100644 --- a/lldb/tools/debugserver/source/CMakeLists.txt +++ b/lldb/tools/debugserver/source/CMakeLists.txt @@ -154,6 +154,10 @@ endif() add_definitions(-DLLDB_USE_OS_LOG) +if(NOT CMAKE_OSX_SYSROOT) + message(FATAL_ERROR "debugserver needs the macOS SDK root. Please pass in -DCMAKE_OSX_SYSROOT in your CMake invocation") +endif() + if(${CMAKE_OSX_SYSROOT} MATCHES ".Internal.sdk$") message(STATUS "LLDB debugserver energy support is enabled") add_definitions(-DLLDB_ENERGY) `````````` </details> https://github.com/llvm/llvm-project/pull/138020 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits