<div dir="ltr">btw, Hans, Nico: I noticed that we are using a different triple with `llvm37_32bit/bin/clang-cl.exe -m64` vs `llvm37_64bit/bin/clang-cl.exe`.<div><br></div><div><a href="http://i.imgur.com/eJXf2XN.png">http://i.imgur.com/eJXf2XN.png</a><br></div><div>The `llvm37_32bit/bin/clang-cl.exe -m64` side of the diff is red; the `llvm37_64bit/bin/clang-cl.exe` side is in green.<br></div><div>The primary difference seems to be:</div><div>`llvm37_32bit/bin/clang-cl.exe -m64` chooses `-triple x86_64-pc-windows-msvc18.0.0`<br></div><div>`llvm37_64bit/bin/clang-cl.exe` chooses `-triple x86_64-w64-windows-msvc18.0.0`<br></div><div><br></div><div>Not sure if this is intended behavior or not, but just thought I'd let you guys know, since from what you guys were saying in IRC it sounded like `llvm37_32bit/bin/clang-cl.exe -m64` is supposed to be equivalent to `llvm37_64bit/bin/clang-cl.exe`. Like I said, I managed to get it building with the settings in the OP, so the difference is not a big deal it seems.</div><div><br></div><div>-- Sean SIlva</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 17, 2015 at 9:07 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nico, Hans, Takumi,<div><br></div><div>I made it to the bottom of the issue. Turns out that</div><div>CMAKE_C_FLAGS=-m64</div><div>CMAKE_CXX_FLAGS=-m64</div><div>CMAKE_EXE_LINKER_FLAGS=/machine:x64</div><div>is enough to do a 64-bit build correctly with a 32-bit clang-cl (i.e. one that targets 32-bit by default). Hooray! The missing piece that I had to track down is why I would see `deps = msvc` stuff spewing onto my terminal, rather than consumed properly by ninja. I noticed that in rules.ninja, CMake had generated:</div><div><br></div><div>msvc_deps_prefix = LINK : error LNK2001: <br></div><div><br></div><div>After some hunting in procmon, I found that there was a call to clang-cl done during the configure process that *wasn't including -m64*, leading to a link error. The text of the link error was then being interpreted as a valid output for setting msvc_deps_prefix.</div><div><br></div><div>Attached is a quick hack patch for CMake that fixes the issue for me locally. Some more details are in the commit message for the patch. It's not ideal by any means... my CMake-fu is weak.</div><div><br></div><div>Brad, you seem to be roughly our liaison with the CMake community. Do you know what the next steps are for getting this fixed in CMake upstream?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- Sean Silva</div></font></span></div>
</blockquote></div><br></div>