This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Look for "clang-<major>" when locating a suitable preprocessor
ClosedPublic

Authored by mstorsjo on Mar 24 2023, 3:25 AM.

Details

Summary

In some cases, there's no adjacent executable named "clang" or
"clang-cl", but one name "clang-<major>". This logic doesn't
cover every possible deployment setup of course, but should
cover more fairly common/reasonable cases.

See
https://github.com/curl/curl-for-win/commit/caaae171ac43af5b883403714dafd42030d8de61#commitcomment-105808524
for discussion about a case where this would have been helpful.

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 24 2023, 3:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 3:25 AM
mstorsjo requested review of this revision.Mar 24 2023, 3:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 3:26 AM
This revision is now accepted and ready to land.Mar 24 2023, 7:17 AM
mstorsjo updated this revision to Diff 508212.Mar 24 2023, 2:16 PM

Reordered the checks to check for "clang-<major>" before plain "clang", as suggested in the linked discussion.