This is an archive of the discontinued LLVM Phabricator instance.

Add a cmake warning when someone tries to configure clang-tools-extra without clang
Needs ReviewPublic

Authored by njames93 on Jun 19 2020, 1:26 AM.

Details

Summary

clang-tools-extra targets wont be generated without clang being enabled, so to help users know why their build commands are failing emit a warning from cmake.
Still unsure if the correct behaviour would be to do what flang does and automatically enable its dependency - mlir.

Diff Detail

Event Timeline

njames93 created this revision.Jun 19 2020, 1:26 AM
njames93 updated this revision to Diff 271953.Jun 19 2020, 1:28 AM

Fix incorrect quote location

Harbormaster completed remote builds in B60960: Diff 271952.

I'd advocate for issuing a message (along the lines of "clang-tools-extra is enabled, which depends on 'clang'. Automatically enabling 'clang'." and 'doing the right thing' by enabling clang.
In fact, this seems to be a common enough paradigm that it should be handled in the cmake infrastructure.

njames93 updated this revision to Diff 275988.Jul 7 2020, 4:11 AM

Automatically enable clang as well as displaying warning

I agree that we might want to abstract this somewhere as I can imagine other subprojects wanting to do it as well. It would probably be nicer for the dependency to appear in the subproject CMakeLists but I'm not sure if that's possible.
Perhaps we should change the STATUS message to a WARNING for flang too, or at least keep both the same?

njames93 updated this revision to Diff 275999.Jul 7 2020, 4:54 AM

Change message from WARNING to STATUS in line with flang.

DavidTruby resigned from this revision.Jan 15 2021, 6:14 AM