<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Hi all</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">We are looking at a large project that has been written only with the MSVC compiler.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">I've already tried to compile this with Clang-Cl, which goes actually very nicely and already uncovered some bugs.<br>(Let me thank all developers that already worked on making clang-cl such a good tool)</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Unfortunately, we still have more than 50% of that code base that does not compile with Clang-Cl, mainly because of exceptions (also in the STL-implementation of MS)</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">We already tried to enable this via Xclang, though than in crashes, which is the reason it currently is not yet available.<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">You could say to use the /fallback option, which is very nice if you try to use clang for code generation, though for now that is not an option (yet).</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">However, clang has very nice reporting and tools which we are trying to use in some experiments. (First prove it works, than suggest using it)</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">We like to use this reporting if we no longer get why our code isn't compiling. (And sometimes even cl is not getting it, which results in no information at all on internal compiler error, not even mentioning the performance issues at compile time if it succeeds)</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">There comes the first use-case in which we could use clang and keep it local to a small part of the code-base. (1 cpp file and a lot of headers)</div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Unfortunately, Clang-cl does not support exceptions which fails the compilation way too early because of some stupid try-catch or throw.<br>Yes, you cannot generate code for this, though we don't expect you to do this (yet).</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">So we came up with a new idea, if we tell clang-cl to use the mingw triple. (Note, I might be wrong in the triple value, I cannot look this up right now)<br>We tried:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">clang-cl -Xclang -triple=x86_64-pc-mingw32 OtherArgs</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">clang-cl -triple=x86_64-pc-mingw32 OtherArgs</div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">However for some reason we did not get this working cause it did not accept this arguments.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">So naively I would ask for a way to generate incompatible object files.<br>However, if someone has a better solution into dry-running the compiler (Has to be clang-cl) it would be appreciated.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div></div><div><div class="gmail_signature"><div dir="ltr"><div><font face="verdana, sans-serif">JVApen<font size="1"><br><br></font></font></div></div></div></div>
</div>