|clang, c++, cc, clang++, clang-cpp(1)||the Clang C, C++, and Objective-C compiler|
|gcc, c++, cc, g++(1)||GNU project C and C++ compiler|
|CLANG, CLANG++, CLANG-CPP(1)||Clang||CLANG, CLANG++, CLANG-CPP(1)|
Clang also supports the use of an integrated assembler, in which the code generator produces object files directly. This avoids the overhead of generating the ".s" file and of calling the target assembler.
Clang Static Analyzer
The Clang Static Analyzer is a tool that scans source code to try to find bugs through code analysis. This tool uses many parts of Clang and is built into the same driver. Please see <https://clang-analyzer.llvm.org> for more details on how to use the static analyzer.
Supported values for the C language are:
c89 c90 iso9899:1990
The default C language standard is gnu11, except on PS4, where it is gnu99.
Supported values for the C++ language are:
The default C++ language standard is gnu++14.
Supported values for the OpenCL language are:
The default OpenCL language standard is cl1.0.
Supported values for the CUDA language are:
-O1 Somewhere between -O0 and -O2.
-O2 Moderate level of optimization which enables most optimizations.
-O3 Like -O2, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster).
-Ofast Enables all the optimizations from -O3 along with other aggressive optimizations that may violate strict compliance with language standards.
-Os Like -O2 with extra optimizations to reduce code size.
-Oz Like -Os (and thus -O2), but reduces code size further.
-Og Like -O1. In future versions, this option might disable different optimizations in order to improve debuggability.
-O Equivalent to -O2.
-O4 and higher
-gline-tables-only Generate only line table debug information. This allows for symbolicated backtraces with inlining information, but does not include any information about variables, their locations or types.
-gmodules Generate debug information that contains external references to types defined in Clang modules or precompiled headers instead of emitting redundant debug type information into every object file. This option transparently switches the Clang module format to object file containers that hold the Clang module together with the debug information. When compiling a program that uses Clang modules or precompiled headers, this option produces complete debug information with faster compile times and much smaller object files.
This option should not be used when building static libraries for distribution to other machines because the debug info will contain references to the module cache on the machine the object files in the library were built on.
The -fstandalone-debug option turns off these optimizations. This is useful when working with 3rd-party libraries that don't come with debug information. This is the default on Darwin. Note that Clang will never emit type information for types that are not referenced at all by the program.
The default for -flto is "full", in which the LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where the linker merges all such modules into a single combined module for optimization. With "thin", ThinLTO compilation is invoked instead.
Empty components in the environment variable are ignored.
|June 23, 2019||8|