[PATCH] D116548: [clang][cmake] Rearrange top-level CMakeLists.txt for D116492

John Ericson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 3 10:22:04 PST 2022


Ericson2314 created this revision.
Ericson2314 added reviewers: beanz, tstellar.
Herald added a subscriber: mgorny.
Ericson2314 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

In that revision, I make LLD match Clang in deprecating `llvm-config`.
This patch isn't to worthwhile on its own --- there isn't a sense in
which the new order is "better" in isolation --- but by putting the
steps that LLD also neeeds to do first, I make the diff between LLD and
Clang's top-level `CMakeLists.txt` very legible.

Longer term I hope:

1. We can remove calling `llvm-config` altogether, and just go strait to finding the CMake config file. This is what Flang does, at least.
2. Hopefully the diffable part is smaller then --- i.e. there is less duplicated boilerplate.
3. Any duplicate boilerplate that remains can be factored out.

I didn't both trying to factor anything out in e.g. the top level common
CMake Utility modules because this deprecated-but-not-removed state is a
merely transitional.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116548

Files:
  clang/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116548.397099.patch
Type: text/x-patch
Size: 4073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220103/7c11f5a0/attachment.bin>


More information about the cfe-commits mailing list