title: Unable to resolve : "cl.exe" is not able to compile a simple test program
body: <p>I am trying to build llvm source code from ninja. </p>
  
  <p>I am following the <a href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html" rel="nofollow noreferrer">http://clang.llvm.org/docs/LibASTMatchersTutorial.html</a>
  guidelines.</p>
  
  <p>When I try to run command on developer command prompt 
  <code>cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_BUILD_TESTS=ON</code></p>
  
  <p>It is throwing error </p>
  
  <pre><code>-- The C compiler identification is MSVC 19.16.27032.1
  -- The CXX compiler identification is MSVC 19.16.27032.1
  -- The ASM compiler identification is MSVC
  -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- broken
  CMake Error at C:/Users/Desktop/clang-llvm/cmake/cmake-3.15.1-win64-x64/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
    The C compiler
  
      "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe"
  
    is not able to compile a simple test program.
  
    It fails with the following output:
  
      Change Dir: C:/Users/Desktop/clang-llvm/build/CMakeFiles/CMakeTmp
  
      Run Build Command(s):C:/Users/Desktop/clang-llvm/ninja/ninja.exe cmTC_2dc03 &amp;&amp; [1/2] Building C object CMakeFiles\cmTC_2dc03.dir\testCCompiler.c.obj
      [2/2] Linking C executable cmTC_2dc03.exe
      FAILED: cmTC_2dc03.exe
      cmd.exe /C "cd . &amp;&amp; C:\Users\Desktop\clang-llvm\cmake\cmake-3.15.1-win64-x64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_2dc03.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_2dc03.dir\testCCompiler.c.obj  /out:cmTC_2dc03.exe /implib:cmTC_2dc03.lib /pdb:cmTC_2dc03.pdb /version:0.0  /machine:X86  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib &amp;&amp; cd ."
      RC Pass 1: command "rc /fo CMakeFiles\cmTC_2dc03.dir/manifest.res CMakeFiles\cmTC_2dc03.dir/manifest.rc" failed (exit code 0) with the following output:
      The system cannot find the file specified
      ninja: build stopped: subcommand failed.
  
  
  
  
  
    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:49 (project)
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Desktop/clang-llvm/build/CMakeFiles/CMakeOutput.log".
  See also "C:/Users/Desktop/clang-llvm/build/CMakeFiles/CMakeError.log".
  
  
  </code></pre>
  
  <p>I tried to run a program with 
  <code>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe</code> and there was no error.</p>
  
  <p>Please let me know if there is solution? Thank you in advance:)</p>