[PATCH] D152121: [CMake] Quote variables where "TARGET" may be a value

Sam James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 21:19:19 PDT 2023


thesamesam created this revision.
thesamesam added reviewers: mgorny, tstellar.
Herald added a subscriber: ekilmer.
Herald added a project: All.
thesamesam requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In CMake, "TARGET" is a special keyword. But it's also an LLVM component, which
means downstreams may request "target" or "TARGET" from CMake. Quote such input
so "TARGET" is interpreted as a string rather than a keyword.

This is a followup to 75a0502fe0053c72b57b61143a55600814d931fd <https://reviews.llvm.org/rG75a0502fe0053c72b57b61143a55600814d931fd> (D150884 <https://reviews.llvm.org/D150884>).

Fixes Meson's test suite and an issue which manifested identically to #61436
but appears to have been a slightly different problem.

Bug: https://github.com/mesonbuild/meson/issues/11642
Bug: https://github.com/llvm/llvm-project/issues/61436


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152121

Files:
  llvm/cmake/modules/LLVM-Config.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152121.528273.patch
Type: text/x-patch
Size: 4373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/c97f5e2a/attachment.bin>


More information about the llvm-commits mailing list