This is an archive of the discontinued LLVM Phabricator instance.

MSVC: support version preference with search
ClosedPublic

Authored by compnerd on Mar 7 2023, 10:14 AM.

Details

Summary

Extend the logic for the WinSDK and UCRT handling to prefer a user
specified version of the VisualC++ tools and Windows SDK. This allows
us to now perform the regular search for the installation but select the
exact version of the SDK or VC++ tools to override the latest version.
Similar to the other flags controlling this behaviour, if the user
specifies a value, we will not perform validation on the input and will
attempt to prefer that, particularly in the case of VisualC++ tools
where no fallback occurs.

Diff Detail

Event Timeline

compnerd created this revision.Mar 7 2023, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 10:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
compnerd requested review of this revision.Mar 7 2023, 10:14 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 7 2023, 10:14 AM
hans accepted this revision.Mar 9 2023, 2:30 AM

lgtm

I wish the way clang-cl finds system libraries was better documented though. Since you've been digging through this code, would you be up for writing something in the https://clang.llvm.org/docs/UsersManual.html#clang-cl section?

This revision is now accepted and ready to land.Mar 9 2023, 2:30 AM

Sure thing, I can try to write up some details about that @hans!

This revision was landed with ongoing or failed builds.Mar 13 2023, 9:25 AM
This revision was automatically updated to reflect the committed changes.