Page MenuHomePhabricator

[cmake] Limit missing external lit warning to be shown once
ClosedPublic

Authored by kastiglione on Oct 13 2020, 6:29 PM.

Details

Summary

When using a custom LLVM_EXTERNAL_LIT, it's possible the file may not exist at the time CMake is generating the build. One example is LLDB standalone builds. When the external lit doesn't exist, a warning message is emitted, but the warning is printed once for every lit target. This produces many redundant warnings.

This changes the warning to only be emitted once, controlled by a CACHE variable.

Other options are:

  1. remove the warning
  2. have callers pass an option to silence the warning if desired

See https://reviews.llvm.org/D76945 for some context.

Diff Detail

Unit TestsFailed

TimeTest
850 mslinux > Clangd Unit Tests._/ClangdTests::Hover.Structured
Note: Google Test filter = Hover.Structured [==========] Running 1 test from 1 test case. [----------] Global test environment set-up.
8,810 mswindows > Clangd Unit Tests._/ClangdTests_exe::Hover.Structured
Note: Google Test filter = Hover.Structured [==========] Running 1 test from 1 test case.

Event Timeline

kastiglione created this revision.Oct 13 2020, 6:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2020, 6:29 PM
kastiglione requested review of this revision.Oct 13 2020, 6:29 PM
kastiglione edited the summary of this revision. (Show Details)

else/if -> elseif

JDevlieghere added inline comments.Oct 13 2020, 6:43 PM
llvm/cmake/modules/AddLLVM.cmake
1661

This should probably be of type INTERNAL which is the same as CACHE but without the (G)UI entry.

Use type INTERNAL

llvm/cmake/modules/AddLLVM.cmake
1661

nice, done.

kastiglione marked an inline comment as done.Oct 13 2020, 7:12 PM
JDevlieghere accepted this revision.Oct 13 2020, 7:58 PM

LGTM. Thanks for fixing this!

This revision is now accepted and ready to land.Oct 13 2020, 7:58 PM
This revision was landed with ongoing or failed builds.Oct 13 2020, 9:03 PM
This revision was automatically updated to reflect the committed changes.