<div dir="ltr">Yeah, I think this documents internal options.<div><br></div><div>1. Driver uses -target, frontend (clang -cc1) uses -triple. Frontend seems to understand '--option=' form but driver doesn't.</div>

<div><br></div><div>2. That's why I said that we could do better, these are defined in Tripple.h and looking them up in there would be your best bet.</div><div><br></div><div>3. I'm guessing historical reasons, I think that abi part was introduced not too long ago. You pass i386-pc-win32 to the driver and it turns it into i386-pc-win32-msvc before passing it to frontend, you can observe these with -###.</div>

<div><br></div><div>4. I agree, and patches for documentation would be very welcome.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 14, 2014 at 9:42 AM, Edward Diener <span dir="ltr"><<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@tropicsoft.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 7/13/2014 6:23 PM, Nikola Smiljanic wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It's documented to some extent<br>
<a href="http://clang.llvm.org/docs/CrossCompilation.html#target-triple" target="_blank">http://clang.llvm.org/docs/<u></u>CrossCompilation.html#target-<u></u>triple</a> but we<br>
could probably do better here.<br>
</blockquote>
<br></div>
The doc you cite is very different from the 'clang --help' doc:<br>
<br>
1) In the "clang --help" it gives the target option as "--target=<value> but the doc shows the target option as "-target value". Do all options take the duplicate form, ie. "--option=value" or "-option value" ?<br>


<br>
2) The targets given in the original answer below start with "i386" but the <arch> part of the doc specifies only "x86, arm, thumb, mips".<br>
<br>
3) Why is the form called a "Target Triple" when it has a maximum 4 parts ?<br>
<br>
4) All the valid possibilities for each part should be documented, with an explanation, else you are asking the end-user to play guessing games or be a mind-reader. Writing etc. does not explain anything in the doc.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
<br>
On Mon, Jul 14, 2014 at 4:41 AM, Edward Diener<br>
<<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@tropicsoft.<u></u>com</a><br></div><div class="">
<mailto:<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@<u></u>tropicsoft.com</a>>> wrote:<br>
<br>
    On 7/8/2014 11:13 AM, Nico Weber wrote:<br>
<br>
        On Tue, Jul 8, 2014 at 6:54 AM, Edward Diener<br></div><div class="">
        <eldlistmailingz@tropicsoft.__<u></u>com<br>
        <mailto:<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@<u></u>tropicsoft.com</a>><br>
        <mailto:<a href="mailto:eldlistmailingz@" target="_blank">eldlistmailingz@</a>__<a href="http://tropicsoft.com" target="_blank">trop<u></u>icsoft.com</a><br></div><div><div class="h5">
        <mailto:<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@<u></u>tropicsoft.com</a>>>><br>
        wrote:<br>
<br>
             Since the two versions for clang on Windows, one using VC++<br>
        RTL and<br>
             emulating VC++ to some small extent and the other using<br>
        mingw rtl,<br>
             are radically different, is there any easy way to distinguish<br>
             between them at pre-execution time.<br>
<br>
             In Boost Build we currently have a single toolset named<br>
        'clang' for<br>
             the clang compiler. On Linux it uses a clang-linux.jam<br>
        file, on the<br>
             Mac it uses a clang-darwin.jam file, and I am trying to<br>
        establish<br>
             .jam files for using clang on Windows. Essentially I can<br>
        use the<br>
             clang-linux.jam file with a slight modification if the<br>
        clang version<br>
             uses mingw, but I need to use a clang-win.jam file if the clang<br>
             version uses VC++. So somewhere early in the Boost Build<br>
        processing<br>
             I have to determine which 'clang.exe' is being used on<br>
        Windows in<br>
             order to invoke the proper Boost Build jam file for it.<br>
<br>
<br>
        It's not really to different clang binaries as far as I know,<br>
        just the<br>
        same binary with a different default triple. So you could pass an<br>
        explicit -target parameter to force one compiler behavior over<br>
        the other<br>
        too. (-target i386-pc-win32 for VC mode, -target i386-pc-mingw32<br>
        for gcc<br>
        mode)<br>
<br>
<br>
    When using clang --help I see:<br>
<br>
      --target=<value>        Generate code for the given target<br>
<br>
    Is this the target option ( note the -- ) that can be passed to<br>
    clang to change to either VC mode or gcc mode ? If so, are these two<br>
    values you specify above ( "i386-pc-win32" or "i386-pc-mingw32" )<br>
    documented anywhere ? If this is not the target option you have<br>
    mentioned, is that target option ( maybe with a single - )<br>
    documented anywhere ?<br>
<br>
<br></div></div>
    ______________________________<u></u>___________________<div class=""><br>
    cfe-dev mailing list<br>
    <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
    <mailto:<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>><br></div>
    <a href="http://lists.cs.uiuc.edu/__mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/__<u></u>mailman/listinfo/cfe-dev</a><br>
    <<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a>><div class=""><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>