Where can I find a complete list of Clang flags?
There are some, like -include-pch
, that don't appear to be even listed in the man page. :(
I know that GCC uses some of the same flags, but it doesn't include documentation for stuff like -Os
which I believe is only available in Clang. Is there a place where I can find a single, consolidated list of all the Clang options ever?
(GNU C is a language, GCC is a compiler for that language.Clang defines __GNUC__ / __GNUC_MINOR__ / __GNUC_PATCHLEVEL__ according to the version of gcc that it claims full compatibility with.
In the end, Apple chose to develop Clang, a new compiler front end that supports C, Objective-C and C++. In July 2007, the project received the approval for becoming open-source.
Clang is much faster and uses far less memory than GCC. Clang aims to provide extremely clear and concise diagnostics (error and warning messages), and includes support for expressive diagnostics. GCC's warnings are sometimes acceptable, but are often confusing and it does not support expressive diagnostics.
C++17 implementation statusYou can use Clang in C++17 mode with the -std=c++17 option (use -std=c++1z in Clang 4 and earlier).
I don't know if this is exactly what you want. Maybe more options are described elsewhere, but I think you are interested in the Clang frontend options. By default, the options displayed seem to describe the "GCC-compatible driver".
clang -cc1 --help
should give you what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With