https://github.com/da-viper updated https://github.com/llvm/llvm-project/pull/196366
>From e515700f04eff90bd91d6246e10a794a40ee7a0b Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Thu, 7 May 2026 17:43:05 +0100 Subject: [PATCH] [lldb-dap] Fix build when using precompiled header and Xcode generator. When building with precompiled headers and Xcode as a generator, It adds obj.lldbDAP.dir/${BUILD_TYPE}/cmake_pch.xxx but does not generate one causing the build to fail. This might have to do with `add_llvm_library` adding a source file `Dummy.c` to any object it creates if using Xcode as a generator and `lldbDAP` object not declaring it's LINK_LIBS and LINK_COMPONENTS. rdar://176469365 --- lldb/tools/lldb-dap/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lldb/tools/lldb-dap/CMakeLists.txt b/lldb/tools/lldb-dap/CMakeLists.txt index 1a8f167ef0a42..0e309d79376ac 100644 --- a/lldb/tools/lldb-dap/CMakeLists.txt +++ b/lldb/tools/lldb-dap/CMakeLists.txt @@ -77,6 +77,13 @@ add_lldb_library(lldbDAP OBJECT Protocol/ProtocolRequests.cpp ) +# When building with precompiled headers and Xcode as a generator, +# It adds obj.lldbDAP.dir/${BUILD_TYPE}/cmake_pch.xxx but does not generate one +# causing the build to fail. +if(CMAKE_GENERATOR STREQUAL "Xcode") + set_target_properties(lldbDAP PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() + target_include_directories(lldbDAP PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
