This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Quote variables where "TARGET" may be a value
ClosedPublic

Authored by thesamesam on Jun 4 2023, 9:19 PM.

Details

Summary

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 (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

Diff Detail

Event Timeline

thesamesam created this revision.Jun 4 2023, 9:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 9:19 PM
Herald added a subscriber: ekilmer. · View Herald Transcript
thesamesam requested review of this revision.Jun 4 2023, 9:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 9:19 PM
thesamesam updated this revision to Diff 528274.Jun 4 2023, 9:20 PM

Tweak commit message

thesamesam updated this revision to Diff 528276.Jun 4 2023, 9:22 PM

Add some additional cases

tstellar accepted this revision.Jun 5 2023, 6:22 AM

LGTM.

This revision is now accepted and ready to land.Jun 5 2023, 6:22 AM
This revision was automatically updated to reflect the committed changes.