<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Building LLVM trunk for Win32 (32-bit) target crashes MSVC"
   href="https://bugs.llvm.org/show_bug.cgi?id=50128">50128</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Building LLVM trunk for Win32 (32-bit) target crashes MSVC
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>srj@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Summary: Building LLVM for 32-bit Win32, using MSVC 2019, on recent trunk
builds, crashes the compiler.

This is using the most recent MSVC 2019 Community Edition on a Win10 x86-64
box:


```
$ vcvarsall.bat x64_x86 
$ cmake -G Ninja C:/path/to/llvm-project/llvm -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=C:/path/to/llvm-install -DLLVM_BUILD_32_BITS=ON
-DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_LIBXML2=OFF
-DLLVM_ENABLE_PROJECTS=clang;lld -DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_TARGETS_TO_BUILD=X86;ARM;NVPTX;AArch64;Mips;Hexagon;PowerPC;WebAssembly
$ ninja -C C:/path/to/llvm-build -j 18 install
```

this chugs away for quite some time, but eventually fails building
clang-tblgen, with:

```
[2220/3953] Building CXX object
tools\clang\utils\TableGen\CMakeFiles\clang-tblgen.dir\ClangOpenCLBuiltinEmitter.cpp.obj
FAILED:
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpenCLBuiltinEmitter.cpp.obj 
C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x86\cl.exe
 /nologo /TP -DCLANG_ROUND_TRIP_CC1_ARGS=ON -DUNICODE
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_LARGEFILE_SOURCE
-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\clang\utils\TableGen
-IC:\code\build_bot\worker\llvm-13-x86-32-windows\llvm-project\clang\utils\TableGen
-IC:\code\build_bot\worker\llvm-13-x86-32-windows\llvm-project\clang\include
-Itools\clang\include -Iinclude
-IC:\code\build_bot\worker\llvm-13-x86-32-windows\llvm-project\llvm\include
/DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Zc:strictStrings /Oi
/Zc:rvalueCast /bigobj /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351
-wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512
-wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389
-wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062
-we4238 /Gw /MD /O2 /Ob2  /EHs-c- /GR -UNDEBUG -std:c++14 /showIncludes
/Fotools\clang\utils\TableGen\CMakeFiles\clang-tblgen.dir\ClangOpenCLBuiltinEmitter.cpp.obj
/Fdtools\clang\utils\TableGen\CMakeFiles\clang-tblgen.dir\ /FS -c
C:\code\build_bot\worker\llvm-13-x86-32-windows\llvm-project\clang\utils\TableGen\ClangOpenCLBuiltinEmitter.cpp
C:\code\build_bot\worker\llvm-13-x86-32-windows\llvm-project\clang\utils\TableGen\ClangOpenCLBuiltinEmitter.cpp(514)
: fatal error C1001: Internal compiler error.
(compiler file 'd:\A01\_work\3\s\src\vctools\Compiler\Utc\src\p2\main.c', line
212)
 To work around this problem, try simplifying or changing the program near the
locations listed above.
If possible please provide a repro here:
<a href="https://developercommunity.visualstudio.com">https://developercommunity.visualstudio.com</a> 
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information
  cl!RaiseException()+0x69
  cl!RaiseException()+0x69
  cl!CloseTypeServerPDB()+0x22ebf
  cl!CloseTypeServerPDB()+0xedea9
```

I don't (yet) have an injection point for when the failure started occurring,
but it was sometime within the past week. I'll update this bug if/when I find
one.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>