This is an archive of the discontinued LLVM Phabricator instance.

[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

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.