================ @@ -154,6 +154,21 @@ endif() add_definitions(-DLLDB_USE_OS_LOG) +# Make sure we have the macOS SDK root as mig needs it and will silently +# fail to generate its output files without it. +if(CMAKE_OSX_SYSROOT) + set(MIG_SYSROOT ${CMAKE_OSX_SYSROOT}) +else() + execute_process(COMMAND xcrun --show-sdk-path + OUTPUT_VARIABLE MIG_SYSROOT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +if(NOT MIG_SYSROOT) + message(FATAL_ERROR "Unable to obtain macOS SDK root, debugserver cannot be built.") ---------------- JDevlieghere wrote:
Let's make this more specific and actionable. ```suggestion message(FATAL_ERROR "Unable to obtain sysroot required by mig (Mach Interface Generator). Set CMAKE_OSX_SYSROOT to explicitly specify a sysroot.") ``` 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