Exact meaning of '-march=' and '-mcpu=' options in clang

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Exact meaning of '-march=' and '-mcpu=' options in clang

David Blaikie via cfe-dev
Hi!

I'm not able to find an accurate descriptions of these two options at
the docs. In the case of GCC, '-march' selects the instruction set
being used, while '-mcpu' just tunes the code for a processor without
reducing the compatibility, so, without using instructions not implied
by the '-march' setting  (ie: with '-march=G5' you will generate PPC
code that won't run in processors older than G5, but with '-mcpu=G5'
it will run in older processors if the '-march' option allows).

Is it the same in clang?

Also, are the possible values for '-mcpu' the same as for '-march', or
do they differ? Where can I find a list of accepted values for both
options?

Thanks a lot,

ardi
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev