This is an archive of the discontinued LLVM Phabricator instance.

[Windows on Arm] Add env var for msvc compatibility option
ClosedPublic

Authored by DavidSpickett on Aug 12 2022, 6:08 AM.

Details

Summary

We are using clang 14.0.5 which has a default version of 19.26.

This adds use of an env var MSVC_VER that we'll set on our
side for this and future updates as the clang-cl version
doesn't always track what llvm needs to build.

Diff Detail

Event Timeline

DavidSpickett created this revision.Aug 12 2022, 6:08 AM
Herald added a project: Restricted Project. · View Herald Transcript
DavidSpickett requested review of this revision.Aug 12 2022, 6:08 AM

See https://lab.llvm.org/buildbot/#/builders/65/builds/6373

CMake Error at cmake/modules/CheckCompilerVersion.cmake:69 (message):
  Host Clang must have at least -fms-compatibility-version=19.27, your
  version is 19.26.

We have been giving this option to clang-13 for local builds and haven't seen any issues so it's pretty low risk and 15.0.0 is too far away to leave the bots red IMO.

rovka accepted this revision.Aug 15 2022, 12:16 AM

LGTM. Do you think we should use an environment variable instead, so we can just change it on the machine in the future (rather than going through zorg again)? We're doing something similar a few lines down with the path to the builtins library (needed by flang).

This revision is now accepted and ready to land.Aug 15 2022, 12:16 AM

Use MSVC_VER env var instead.

DavidSpickett retitled this revision from [Windows on Arm] Set msvc compatibility to 19.27 to [Windows on Arm] Add env var for msvc compatibility option.Aug 15 2022, 2:29 AM
DavidSpickett edited the summary of this revision. (Show Details)

@rovka Does the env var version look good to you?