[Lldb-commits] [PATCH] D68376: [lldb] Fix that 'ninja clean' breaks the build by deleting debugserver_vers.c

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 3 01:02:47 PDT 2019


teemperor created this revision.
teemperor added reviewers: JDevlieghere, labath.
Herald added subscribers: lldb-commits, abidh, mgorny.
Herald added a project: LLDB.

We mark debugserver_vers.c as a generated file in CMake. This means that when we run `ninja clean` we end up deleting that file,
but any following `ninja` invocation will fail due to the file missing. The file can't be generated as `ninja` doesn't know it has to
rerun CMake to create the file. Turns out that marking the output of configure_file as generated is wrong as explained in this bug report:
https://gitlab.kitware.com/cmake/cmake/issues/18032

This patch just removes that property. The only side effect of this seems to be that this file maybe shows up in your IDE when
opening our CMake project, but that seems like a small sacrifice.

This patch can be quickly tested by running `ninja clean ; ninja lldbDebugserverCommon`. Before this patch the build will fail
due to debugserver_vers.c missing.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68376

Files:
  lldb/tools/debugserver/source/CMakeLists.txt


Index: lldb/tools/debugserver/source/CMakeLists.txt
===================================================================
--- lldb/tools/debugserver/source/CMakeLists.txt
+++ lldb/tools/debugserver/source/CMakeLists.txt
@@ -136,7 +136,6 @@
   )
 
 set(DEBUGSERVER_VERS_GENERATED_FILE ${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
-set_source_files_properties(${DEBUGSERVER_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
 configure_file(debugserver_vers.c.in
                ${DEBUGSERVER_VERS_GENERATED_FILE} @ONLY)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68376.222972.patch
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191003/da0aa3f8/attachment.bin>


More information about the lldb-commits mailing list