This allows consumer to override in a cleaner way while still prevent
them from hitting bug without knowing they run an unsupported
configuration.
Details
- Reviewers
aganea hans - Commits
- rGdd50560c38db: MSVC Buggy version detection: turn pre-processor error into CMake configuration…
rG5f940220bf94: MSVC Buggy version detection: turn pre-processor error into CMake configuration…
rGb4fac782462c: MSVC Buggy version detection: turn pre-processor error into CMake configuration…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
I don't have a windows machine to check if this correctly check the MSVC version, can you check that?
Unit tests: unknown.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
Unit tests: pass. 62315 tests passed, 0 failed and 838 were skipped.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
I've confirmed with this patch I can build llvm again using vs2019 latest (16.4.3), with the following (expected) test fails:
Failing Tests (4): LLVM :: MC/MachO/gen-dwarf-cpp.s LLVM :: MC/MachO/gen-dwarf-macro-cpp.s LLVM :: MC/MachO/gen-dwarf-producer.s LLVM :: MC/MachO/gen-dwarf.s
Oddly I didn't need the sal.h include but this should probably be left in for now.
Address comments: check version between 19.24 and 19.25, restore the unrelated part of the header
llvm/cmake/modules/CheckCompilerVersion.cmake | ||
---|---|---|
63 | add “Please upgrade to version 16.5+ or use clang-cl” ? |
llvm/cmake/modules/CheckCompilerVersion.cmake | ||
---|---|---|
63 | @mehdi_amini: In addition to what @xbolva00 said, people on Windows usually refer to the Visual Studio version (16.4 here), not to the internal MSC version (19.24). I think from a user perspective, it is better to say "Host Visual Studio version 16.4 is known to miscompile part of LLVM. Please upgrade to version 16.5+ or use clang-cl." |
Unit tests: fail. 62354 tests passed, 1 failed and 839 were skipped.
failed: libc++.std/containers/sequences/array/array_creation/to_array.fail.cpp
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
Unit tests: fail. 62354 tests passed, 1 failed and 839 were skipped.
failed: libc++.std/containers/sequences/array/array_creation/to_array.fail.cpp
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
- Use 16.4/16.5 to refer to VisualStudio version name
- Improve error message with upgrade advice
Unit tests: fail. 62354 tests passed, 1 failed and 839 were skipped.
failed: libc++.std/containers/sequences/array/array_creation/to_array.fail.cpp
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
Unit tests: fail. 62354 tests passed, 1 failed and 839 were skipped.
failed: libc++.std/containers/sequences/array/array_creation/to_array.fail.cpp
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
Seems like it didn't work quite right:
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14047
Thanks for the ping! Reverted in 1e417ba2d4d2
I'm not sure I understand the error though: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14047/steps/stage%201%20cmake/logs/stdio ; it says "Unknown arguments specified"?
Re-landed and the bot passed the CMake step: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14053
Thanks Mehdi! Cherry-picked to 10.x as dd50560c38dbdcf1e809f15b4f3c26152f439a03. Please let me know if there are any follow-ups.
ref: https://docs.microsoft.com/zh-cn/visualstudio/releases/2019/release-notes#16.4.6
ms fixed this bug without bump cl minor version.
new version info:
_MSC_VER=1924 _MSC_FULL_VER=192428319
cl version is [19.24.28319]
so we need use
_MSC_FULL_VER>=192428319
and compare CMAKE_CXX_COMPILER_VERSION with 19.24.28319
I think the full CMAKE_CXX_COMPILER_VERSION has more components, e.g. 19.16.27034.0. Maybe it should check >= 19.24 and < 19.25?