Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Build failure when compiling with clang-cl #49419

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR50450
Status CONFIRMED
Importance P normal
Reported by Markus Böck (markus.boeck02@gmail.com)
Reported on 2021-05-23 03:56:03 -0700
Last modified on 2021-06-08 18:19:39 -0700
Version unspecified
Hardware PC Windows NT
CC iuslkae@protonmail.com, jpienaar@google.com, riddleriver@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Current trunk (d4abbcfb0d4aa57878c17940265035c787e3bec0) is not able to be
built using clang-cl.

Test environment:
clang-cl 12
Visual Studio 16.9.6

Error messages:
[59/75] Building CXX object tools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-
tblgen.dir\RewriterGen.cpp.obj
FAILED: tools/mlir/tools/mlir-tblgen/CMakeFiles/mlir-
tblgen.dir/RewriterGen.cpp.obj
C:\clang\Default\bin\clang-cl.exe  /nologo -TP -DGTEST_HAS_RTTI=0 -
DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -DUNICODE -
D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -
D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -
D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -
D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -
Itools\mlir\tools\mlir-tblgen -IC:\llvm-project\mlir\tools\mlir-tblgen -
Iinclude -IC:\llvm-project\llvm\include -IC:\llvm-project\mlir\include -
Itools\mlir\include -m64 -fsanitize=undefined -fsanitize-undefined-trap-on-
error /Zc:inline /Zc:__cplusplus /Zc:strictStrings /Oi /Zc:rvalueCast /Brepro
/bigobj /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -
Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -
Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-
conversion -Wmisleading-indentation /MT /Zi /Ob0 /Od /RTC1  /EHs-c- /GR- -
std:c++14 /showIncludes /Fotools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-
tblgen.dir\RewriterGen.cpp.obj /Fdtools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-
tblgen.dir\ -c -- C:\llvm-project\mlir\tools\mlir-tblgen\RewriterGen.cpp
In file included from C:\llvm-project\mlir\tools\mlir-tblgen\RewriterGen.cpp:13:
In file included from C:\llvm-
project\mlir\include\mlir/Support/IndentedOstream.h:18:
In file included from C:\llvm-
project\llvm\include\llvm/Support/raw_ostream.h:17:
In file included from C:\llvm-project\llvm\include\llvm/ADT/StringRef.h:12:
In file included from C:\llvm-project\llvm\include\llvm/ADT/STLExtras.h:19:
In file included from C:\llvm-project\llvm\include\llvm/ADT/Optional.h:18:
In file included from C:\llvm-project\llvm\include\llvm/ADT/Hashing.h:55:
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\tuple(186,9): error:
implicit instantiation of undefined template
'llvm::detail::missing_format_adapter<llvm::SmallVector<std::basic_string<char>,
8> &>'
    _Ty _Val;
        ^
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\tuple(709,23): note: in
instantiation of template class
'std::_Tuple_val<llvm::detail::missing_format_adapter<llvm::SmallVector<std::basic_string<char>,
8> &>>' requested here
    _Tuple_val<_This> _Myfirst; // the stored element
                      ^
C:\llvm-project\mlir\include\mlir/TableGen/Format.h(170,9): note: in
instantiation of template class
'std::tuple<llvm::detail::missing_format_adapter<llvm::SmallVector<std::basic_string<char>,
8> &>>' requested here
  Tuple parameters;
        ^
C:\llvm-project\mlir\tools\mlir-tblgen\RewriterGen.cpp(285,37): note: in
instantiation of template class
'mlir::tblgen::FmtObject<std::tuple<llvm::detail::missing_format_adapter<llvm::SmallVector<std::basic_string<char>,
8> &>>>' requested here
  auto nativeCodeCall = std::string(tgfmt(
                                    ^
C:\llvm-project\llvm\include\llvm/Support/FormatVariadicDetails.h(54,29): note:
template is declared here
template <typename T> class missing_format_adapter;
                            ^
Quuxplusone commented 3 years ago

Exact same issue here, just clone the latest main branch and compile under x64 native tools in windows with 'ninja' ;'(