This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Add clangMinimumVersion to multilib.yaml
AbandonedPublic

Authored by michaelplatings on Feb 10 2023, 10:03 AM.

Details

Reviewers
peter.smith
Summary

This avoids a potential source of subtle errors if an older version of
Clang were to be used with a multilib.yaml that requires a newer Clang
to work correctly.

This feature is comparable to CMake's cmake_minimum_required.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 10:03 AM
Herald added a subscriber: dmgreen. · View Herald Transcript
michaelplatings requested review of this revision.Feb 10 2023, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 10:03 AM

I think this patch can be merged into a previous one that introduces variants and flagMap

No objections to MaskRay's suggestion to merge with an earlier patch. I've made some suggestions to make the error messages be a bit more specific about what is wrong.

clang/lib/Driver/Multilib.cpp
185

Perhaps
"missing required key 'clangMinimumVersion' expect MAJOR.MINOR.PATCHLEVEL" to give an idea what the key is expecting?

195

Can we add why the version string isn't valid? For example "expected format MAJOR.MINOR.PATCHLEVEL got " + M.CLangMinimumVersion ...

200

Similarly, can we say what we were expecting. For example all components must be decimal integers.

michaelplatings abandoned this revision.Feb 22 2023, 3:42 AM
michaelplatings marked 3 inline comments as done.

Squashed into D142932