Author: Ebuka Ezike Date: 2026-05-08T10:21:45+01:00 New Revision: 242326570654760dd6bbd7c4120b39615518a1cf
URL: https://github.com/llvm/llvm-project/commit/242326570654760dd6bbd7c4120b39615518a1cf DIFF: https://github.com/llvm/llvm-project/commit/242326570654760dd6bbd7c4120b39615518a1cf.diff LOG: [lldb-dap] Fix build when using precompiled header and Xcode generator. (#196366) 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. Added: Modified: lldb/tools/lldb-dap/CMakeLists.txt Removed: ################################################################################ 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
