[llvm] r315870 - Phony change to CMakeLists.txt to (hopefully) trigger regeneration

Don Hinton via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 07:35:49 PDT 2017


On Mon, Oct 16, 2017 at 6:41 AM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:

> The problem was that cmake would not re-run to update the Makefiles (or
> ninja equivalents). If I just deleted the CFIVerifyTests executable, ninja
> would still rebuild it.
>

That's not how llvm-lit works.  If it finds a matching file in the tree, it
runs it.

The buildbot owners need to delete CFIVerifyTests -- either by removing the
build directory (as you did below), deleting the file -- even ninja clean
won't help, since cmake no longer knows anything about the file.

You can test this locally if you want (assumes you are building X86):

1) intentionally break CFIVerifyTests, then run ninja check-llvm-unit to
verify the test breaks:

diff --git a/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
b/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
index 66fdc42ccfc..f0db3f55990 100644
--- a/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
+++ b/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
@@ -47,7 +47,7 @@ namespace {
 class ELFx86TestFileAnalysis : public FileAnalysis {
 public:
   ELFx86TestFileAnalysis()
-      : FileAnalysis(Triple("x86_64--"), SubtargetFeatures()) {}
+      : FileAnalysis(Triple("xxx86_64--"), SubtargetFeatures()) {}

   // Expose this method publicly for testing.
   void parseSectionContents(ArrayRef<uint8_t> SectionBytes,


$ ninja check-llvm-unit


2) revert change from step 1, intentionally break cmake test so it won't
get rebuilt, and verify test still fails (this is the case for broken
buildbots -- a failing test that cmake doesn't know about and doesn't
rebuild):

diff --git a/unittests/tools/llvm-cfi-verify/CMakeLists.txt
b/unittests/tools/llvm-cfi-verify/CMakeLists.txt
index 0f389592bdd..f22c160ec06 100644
--- a/unittests/tools/llvm-cfi-verify/CMakeLists.txt
+++ b/unittests/tools/llvm-cfi-verify/CMakeLists.txt
@@ -11,7 +11,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )

-list(FIND LLVM_TARGETS_TO_BUILD "X86" x86_idx)
+list(FIND LLVM_TARGETS_TO_BUILD "xxX86" x86_idx)
 if (NOT x86_idx LESS 0)
   add_llvm_unittest(CFIVerifyTests
     FileAnalysis.cpp)


$ ninja check-llvm-unit

3) delete the bad test and verify it no longer fails (this is all buildbot
owners need to do):

$ rm ./unittests/tools/llvm-cfi-verify/CFIVerifyTests
$ ninja check-llvm-unit


4) undo the change from step 2.


> I tried to "touch CMakeCache.txt" on the Hexagon bots, but even that
> didn't cause cmake to reconfigure. I had to remove the contents of the
> build directory to finally get the bot to turn green.
>

Yes, this works because you also deleted CFIVerifyTests.


>
> There should be an option to force a completely clean build, this is not
> the first time we've had this kind of a problem.
>

This wouldn't help, since once you tell cmake to ignore something, it will
no longer build or remove it, i.e., it doesn't know anything about it.

hth...
don


>
> -Krzysztof
>
>
> On 10/15/2017 6:17 PM, Don Hinton wrote:
>
>> Since the red bots are incremental and don't clean up after themselves,
>> someone needs to delete CFIVerifyTests, or the lit will just keep running
>> the old one -- lit's just looking for files with a "Test" suffix in the
>> unittests directory.
>>
>>
>> On Sun, Oct 15, 2017 at 11:23 AM, Krzysztof Parzyszek via llvm-commits <
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>>
>>     Author: kparzysz
>>     Date: Sun Oct 15 11:23:16 2017
>>     New Revision: 315870
>>
>>     URL: http://llvm.org/viewvc/llvm-project?rev=315870&view=rev
>>     <http://llvm.org/viewvc/llvm-project?rev=315870&view=rev>
>>     Log:
>>     Phony change to CMakeLists.txt to (hopefully) trigger regeneration
>>
>>     Ninja doesn't seem to recognize a change in a CMakeLists.txt in a
>>     subdirectory, so r315861 is not having any effect.
>>
>>
>>     Modified:
>>          llvm/trunk/CMakeLists.txt
>>
>>     Modified: llvm/trunk/CMakeLists.txt
>>     URL:
>>     http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.tx
>> t?rev=315870&r1=315869&r2=315870&view=diff
>>     <http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.t
>> xt?rev=315870&r1=315869&r2=315870&view=diff>
>>     ============================================================
>> ==================
>>     --- llvm/trunk/CMakeLists.txt (original)
>>     +++ llvm/trunk/CMakeLists.txt Sun Oct 15 11:23:16 2017
>>     @@ -1012,3 +1012,4 @@ endif()
>>       if (MSVC)
>>         include(InstallRequiredSystemLibraries)
>>       endif()
>>     +
>>
>>
>>     _______________________________________________
>>     llvm-commits mailing list
>>     llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>>
>>
>>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171016/6dfeb5c5/attachment.html>


More information about the llvm-commits mailing list