[cfe-dev] Distinguishing between clang Window versions

Edward Diener eldlistmailingz at tropicsoft.com
Sun Jul 13 16:42:37 PDT 2014


On 7/13/2014 6:23 PM, Nikola Smiljanic wrote:
> It's documented to some extent
> http://clang.llvm.org/docs/CrossCompilation.html#target-triple but we
> could probably do better here.

The doc you cite is very different from the 'clang --help' doc:

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" ?

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".

3) Why is the form called a "Target Triple" when it has a maximum 4 parts ?

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.

>
>
> On Mon, Jul 14, 2014 at 4:41 AM, Edward Diener
> <eldlistmailingz at tropicsoft.com
> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
>
>     On 7/8/2014 11:13 AM, Nico Weber wrote:
>
>         On Tue, Jul 8, 2014 at 6:54 AM, Edward Diener
>         <eldlistmailingz at tropicsoft.__com
>         <mailto:eldlistmailingz at tropicsoft.com>
>         <mailto:eldlistmailingz at __tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>>
>         wrote:
>
>              Since the two versions for clang on Windows, one using VC++
>         RTL and
>              emulating VC++ to some small extent and the other using
>         mingw rtl,
>              are radically different, is there any easy way to distinguish
>              between them at pre-execution time.
>
>              In Boost Build we currently have a single toolset named
>         'clang' for
>              the clang compiler. On Linux it uses a clang-linux.jam
>         file, on the
>              Mac it uses a clang-darwin.jam file, and I am trying to
>         establish
>              .jam files for using clang on Windows. Essentially I can
>         use the
>              clang-linux.jam file with a slight modification if the
>         clang version
>              uses mingw, but I need to use a clang-win.jam file if the clang
>              version uses VC++. So somewhere early in the Boost Build
>         processing
>              I have to determine which 'clang.exe' is being used on
>         Windows in
>              order to invoke the proper Boost Build jam file for it.
>
>
>         It's not really to different clang binaries as far as I know,
>         just the
>         same binary with a different default triple. So you could pass an
>         explicit -target parameter to force one compiler behavior over
>         the other
>         too. (-target i386-pc-win32 for VC mode, -target i386-pc-mingw32
>         for gcc
>         mode)
>
>
>     When using clang --help I see:
>
>       --target=<value>        Generate code for the given target
>
>     Is this the target option ( note the -- ) that can be passed to
>     clang to change to either VC mode or gcc mode ? If so, are these two
>     values you specify above ( "i386-pc-win32" or "i386-pc-mingw32" )
>     documented anywhere ? If this is not the target option you have
>     mentioned, is that target option ( maybe with a single - )
>     documented anywhere ?
>
>
>     _________________________________________________
>     cfe-dev mailing list
>     cfe-dev at cs.uiuc.edu
>     <mailto:cfe-dev at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/__mailman/listinfo/cfe-dev
>     <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>





More information about the cfe-dev mailing list