From 4c86e6ea04cc0aba344bc443ce5dc00019363615 Mon Sep 17 00:00:00 2001 From: Jiasheng Zhang Date: Wed, 16 Jun 2021 17:24:20 +0800 Subject: [PATCH] [CI] Fixed windows build & test (#2434) * [CI] Fixed windows build & test * add comments * add comments * Auto Format Co-authored-by: Taichi Gardener --- taichi/runtime/llvm/runtime.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/taichi/runtime/llvm/runtime.cpp b/taichi/runtime/llvm/runtime.cpp index 847b6d9786d2c..96240f1e05528 100644 --- a/taichi/runtime/llvm/runtime.cpp +++ b/taichi/runtime/llvm/runtime.cpp @@ -2,6 +2,16 @@ // The generated bitcode will likely get inlined for performance. #if !defined(TI_INCLUDED) || !defined(_WIN32) +// The latest MSVC(Visual Studio 2019 version 16.10.1, MSVC 14.29.30037) +// uses llvm-11 as requirements. Check this link for details: +// https://github.com/microsoft/STL/blob/1866b848f0175c3361a916680a4318e7f0cc5482/stl/inc/yvals_core.h#L550-L561. +// However, we use llvm-10 for now and building will fail due to clang version +// mismatch. Therefore, we workaround this problem by define such flag to skip +// the version check. +// NOTE(#2428) +#if defined(_WIN32) || defined(_WIN64) +#define _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH +#endif #include #include