Llvm/clang build issues

Problems continuing

[ 63%] Building RC object tools/lto/CMakeFiles/LTO.dir/__/__/resources/windows_version_resource.rc.res
[ 63%] Linking CXX shared library ..\..\bin\LTO.dll
..\..\lib\LLVMAMDGPUCodeGen.lib : fatal error LNK1136: invalid or corrupt file
LINK Pass 1 failed. with 1136
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"E:\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"E:\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

This doesn’t really look to have anything to do with Clang/LLVM in particular.

Instead, this looks more like one of several things:

  1. Out of disk space. Did you check the size of the files that it’s complaining about? Are they zero-sized?
  2. Your build is partly broken – Start again with a clean build. MSVC has a tendency of not cleaning up partially written output files when a build fails with a compiler/linker crash.
  3. Your MSVC installation is broken – Re-installation time :frowning:
  4. Your hardware is kaput.

I would also recommend using the ninja build tool over nmake. ninja is better behaved. It cleans up output files after failed invocations and will give you more parallelism. It’s a very small executable, so it’s not a huge dependency.